...
Argument | Type | Description |
---|---|---|
string | String | String to be split |
separator | Regular Expressions | Regular expression representing the breakpoints in string where the splits should occur |
...
returns the string "abc"
rather than the single element array ["abc"]
.
Retrieving parameters from a URL
split("https://app.phixflow.com/phixflow/api/1/action/MyApp/MyAPI/trigger?param1=100", "\\?").2
returns a string "param1=100".
The .2 selects the second array element. For multiple parameters delimited by an ampersand, a second split is required.
The following expression will split the string at any single digit between 0 and 9:
...