in reply to How to split a string based on the length of a sequence of characters within the string
To add to AppleFritter’s excellent explanation:
The only reason split is giving you the contents of the separators is that you have capturing parentheses in your regex. From split:
If the PATTERN contains capturing groups, then for each separator, an additional field is produced for each substring captured by a group...
Hope that helps,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to split a string based on character(s) length
by thanos1983 (Parson) on Aug 13, 2014 at 20:21 UTC |