#!/usr/bin/perl -nl use strict; my @fields = split /((?:<[^>]+>|\[[^]]+])+)/; shift @fields if $fields[0] eq ''; print for @fields;
In reply to Re: How to split line of text into array containing macros and non-macro text
by hazylife
in thread How to split line of text into array containing macros and non-macro text
by bulrush
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |