docs: clarify split behavior (#2462)
This commit is contained in:
1 parent
90bfa96249
commit
b7f9587bb9
1 file changed
+7
-1
@@ -1612,6 +1612,9 @@ sections:
|
|||||||
|
|
||||||
Splits an input string on the separator argument.
|
Splits an input string on the separator argument.
|
||||||
|
|
||||||
|
`split` can also split on regex matches when called with
|
||||||
|
two arguments (see the regular expressions section below).
|
||||||
|
|
||||||
examples:
|
examples:
|
||||||
- program: 'split(", ")'
|
- program: 'split(", ")'
|
||||||
input: '"a, b,c,d, e, "'
|
input: '"a, b,c,d, e, "'
|
||||||
@@ -2425,7 +2428,10 @@ sections:
|
|||||||
- title: "`split(regex; flags)`"
|
- title: "`split(regex; flags)`"
|
||||||
body: |
|
body: |
|
||||||
|
|
||||||
For backwards compatibility, `split` splits on a string, not a regex.
|
Splits an input string on each regex match.
|
||||||
|
|
||||||
|
For backwards compatibility, when called with a single argument,
|
||||||
|
`split` splits on a string, not a regex.
|
||||||
|
|
||||||
example:
|
example:
|
||||||
- program: 'split(", *"; null)'
|
- program: 'split(", *"; null)'
|
||||||
|
|||||||
Reference in new issue
Block a user