in reply to Curios use of regular expressions in split
See split:
If the PATTERN contains parentheses, additional list elements are created from each matching substring in the delimiter.
So, if you don't want the additional list elements, don't use capturing parentheses. Use noncapturing parentheses (?: ... ) instead.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Curios use of regular expressions in split
by juliosergio (Sexton) on Feb 15, 2012 at 17:25 UTC | |
by Corion (Patriarch) on Feb 15, 2012 at 17:28 UTC | |
by juliosergio (Sexton) on Feb 15, 2012 at 18:02 UTC | |
by Corion (Patriarch) on Feb 15, 2012 at 18:15 UTC | |
by Anonymous Monk on Feb 15, 2012 at 18:16 UTC | |
by Anonymous Monk on Feb 15, 2012 at 17:28 UTC |