Restore split/1; don't use regexp (fix #576)
This commit is contained in:
1 parent
07d8d5c5ef
commit
1796a716ea
3 files changed
+7
-11
No files matched your search
+5
-5
@@ -869,16 +869,16 @@ capture("(?<a>[a-z]+)-(?<n>[0-9]+)")
|
||||
|
||||
[.[] | split(", ")]
|
||||
["a,b, c, d, e,f",", a,b, c, d, e,f, "]
|
||||
[["a,b","c","d","e,f"],["","a,b","c","d","e,f",""]]
|
||||
[["a,b","c","d","e,f"],["","a,b","c","d","e,f"]]
|
||||
|
||||
########################
|
||||
[.[]|[[sub(", *";":")], [gsub(", *";":")], [scan(", *")], split(", *")]]
|
||||
[.[]|[[sub(", *";":")], [gsub(", *";":")], [scan(", *")]]]
|
||||
["a,b, c, d, e,f",", a,b, c, d, e,f, "]
|
||||
[[["a:b, c, d, e,f"],["a:b:c:d:e:f"],[",",", ",", ",", ",","],["a","b","c","d","e","f"]],[[":a,b, c, d, e,f, "],[":a:b:c:d:e:f:"],[", ",",",", ",", ",", ",",",", "],["","a","b","c","d","e","f",""]]]
|
||||
[[["a:b, c, d, e,f"],["a:b:c:d:e:f"],[",",", ",", ",", ",","]],[[":a,b, c, d, e,f, "],[":a:b:c:d:e:f:"],[", ",",",", ",", ",", ",",",", "]]]
|
||||
|
||||
[.[]|[[sub(", +";":")], [gsub(", +";":")], [scan(", +")], split(", +")]]
|
||||
[.[]|[[sub(", +";":")], [gsub(", +";":")], [scan(", +")]]]
|
||||
["a,b, c, d, e,f",", a,b, c, d, e,f, "]
|
||||
[[["a,b:c, d, e,f"],["a,b:c:d:e,f"],[", ",", ",", "],["a,b","c","d","e,f"]],[[":a,b, c, d, e,f, "],[":a,b:c:d:e,f:"],[", ",", ",", ",", ",", "],["","a,b","c","d","e,f",""]]]
|
||||
[[["a,b:c, d, e,f"],["a,b:c:d:e,f"],[", ",", ",", "]],[[":a,b, c, d, e,f, "],[":a,b:c:d:e,f:"],[", ",", ",", ",", ",", "]]]
|
||||
|
||||
# reference to named captures
|
||||
gsub("(?<x>.)[^a]*"; "+\(.x)-")
|
||||
|
||||
Reference in new issue
Block a user