in reply to Re^2: How to split line of text into array containing macros and non-macro text
in thread How to split line of text into array containing macros and non-macro text

sub parse { my @fields = split /((?:<[^>]+>|{[^}]+})+)/, shift; shift @fields if $fields[0] eq ''; return @fields; }
  • Comment on Re^3: How to split line of text into array containing macros and non-macro text
  • Download Code

Replies are listed 'Best First'.
Re^4: How to split line of text into array containing macros and non-macro text
by bulrush (Scribe) on Mar 26, 2014 at 11:27 UTC
    Thank you, it worked! I forgot braces do not need to be escaped. I appreciate the examples, they help me learn. I'm more of a visual person.