in reply to How to split line of text into array containing macros and non-macro text
#!/usr/bin/perl -nl use strict; my @fields = split /((?:<[^>]+>|\[[^]]+])+)/; shift @fields if $fields[0] eq ''; print for @fields;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to split line of text into array containing macros and non-macro text
by bulrush (Scribe) on Mar 26, 2014 at 10:43 UTC | |
by choroba (Cardinal) on Mar 26, 2014 at 10:45 UTC | |
|
Re^2: How to split line of text into array containing macros and non-macro text
by bulrush (Scribe) on Mar 26, 2014 at 11:08 UTC | |
by hazylife (Monk) on Mar 26, 2014 at 11:13 UTC | |
by bulrush (Scribe) on Mar 26, 2014 at 11:27 UTC |