Skip to content

Commit 9994402

Browse files
committed
String * Regex doesn't exist in old Julia versions
1 parent d96c64c commit 9994402

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/plot_utils.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ see also `labels`
8686
"""
8787
label2index(x::ComponentVector, str) = label2index(labels(x), str)
8888
function label2index(labs, str)
89-
idx = findall(startswith.(labs, str * r"(\.|\[)"))
89+
idx = findall(startswith.(labs, Regex("\\Q$str\\E(?:(\\.|\\[))"))) #str * r"(\.|\[)"))
9090
if !isempty(idx)
9191
return idx
9292
else

0 commit comments

Comments
 (0)