bulrush has asked for the wisdom of the Perl Monks concerning the following question:
Perl 5.8.8. Input line is text but line contains application specific tags indicating macros/tags. There are two types of macros: <macro> and {tag}. There is text interspersed with macros I want to create an array where each entry/slot contains either text only, or just macros/tags.
Input line is: <macro1><macro2>This is line one.{tag1}<macro3>This is more text.
Output array should be:
[0]: <macro1><macro2> [1]: This is line one. [2]: {tag1}<macro3> [3]: This is more text.
Thank you! Try to be kind, this is something new to me. Normally I don't have to separate this stuff.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to split line of text into array containing macros and non-macro text
by hazylife (Monk) on Mar 25, 2014 at 19:22 UTC | |
by bulrush (Scribe) on Mar 26, 2014 at 10:43 UTC | |
by choroba (Cardinal) on Mar 26, 2014 at 10:45 UTC | |
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 |