FrameXX
Well-known member
Splits a string data separated by separator into an array. Equivalent to split(separator) function in javascript.
Nice job!Splits a string data separated by separator into an array. Equivalent to split(separator) function in javascript.
I tried your Block actions.Splits a string data separated by separator into an array. Equivalent to split(separator) function in javascript.
^(?:[^;]+;){[lv=n]}([^;]+)
I tried your Block actions.
Unfortunately there are 2 limitations I found with what I use to use:
1⁰) If the string to remove (by the Replace action) contains special regex characters (such as . and/or * in my case), it doesn't work
2⁰) If one of the 'word' is missing between 2 separators, the loop stops and doesn't scan the rest of the line
I found (Googled) and interesting regex formula to extract (with 1 statement only) the Nth occurrence in a line. Here it is:
where [lv=n] is the rank of the parameter/word you want to extract.Code:^(?:[^;]+;){[lv=n]}([^;]+)
It can extract any kind of character between 2 separators (';' in my example), even empty strings. But you must know the maximum number of parameters/words to extract to limitate the loop to populate the array.
I'm sure you'll improve your nice macro!