in reply to Re: 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

Oops. Unfortunately my original post had a typo. Tags should be {tag} with braces, not brackets. And I can't seem to decipher your code to replace the brackets with braces. I only see one escaped bracket, which doesn't make sense to me.
  • Comment on Re^2: How to split line of text into array containing macros and non-macro text

Replies are listed 'Best First'.
Re^3: How to split line of text into array containing macros and non-macro text
by hazylife (Monk) on Mar 26, 2014 at 11:13 UTC
    sub parse { my @fields = split /((?:<[^>]+>|{[^}]+})+)/, shift; shift @fields if $fields[0] eq ''; return @fields; }
      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.