Differences
This shows you the differences between two versions of the page.
Both sides previous revision
Previous revision
Next revision
|
Previous revision
|
en:explodex [2016/08/07 15:44] admin |
en:explodex [2020/02/28 10:46] (current) |
| |
==== Format ==== | ==== Format ==== |
variable = **explodex** ( //string_expr// , //regex_expr// ) | variable = **explodex** ( [[stringexpressions|string_expression]] , [[regularexpressions|regular_expression]] ) |
| |
returns a [[lists|list]] of strings that must be assigned to a //variable// or used wherever a list may be used. | returns a [[lists|list]] of strings that must be assigned to a [[variables|variable]] or used wherever a list may be used. |
| |
==== Description ==== | ==== Description ==== |
Splits up //string_expr// into substrings wherever the regular expression //regex_expr// occurs. Substrings are stored in either the string or numeric array defined in the assignment statement. The array will be re-dimensioned to the exact size to store all of the substrings. Unlike ExPLODE, EXPLODEX allows ignoring specific variations (case sentive, spelling etc), see example below ”[Aa][Nn][Dd]”. | Splits up [[stringexpressions|string_expression]] into substrings wherever the regular expression [[regularexpressions|regular_expression]] occurs. Substrings are stored in array defined in the assignment statement. The array will be re-dimensioned to the exact size to store all of the substrings. Unlike ExPLODE, EXPLODEX allows ignoring specific variations (case sentive, spelling etc), see example below ”[Aa][Nn][Dd]”. |
| |
If the regular expression includes capturing groups, using parenthesis, then the array returned will contain the entire string matched by the regular expression in index 0 and each of the captured groups in subsequent elements. | If the regular expression includes capturing groups, using parenthesis, then the array returned will contain the entire string matched by the regular expression in index 0 and each of the captured groups in subsequent elements. |