perlquestion
danmcb
This is a problem for a routine(s) I'm thinking of writing.
<BR>
Given a piece of text like this:
<BR>
<CODE>
"my text [and maybe|and here's] more text"
</CODE>
I want an array (or other collection) of these strings<BR>
<CODE>
"my text and maybe more text"
"my text and here's more text"
</CODE>
given this line:<BR>
<CODE>
"my text [and maybe|and here's] more text [the end|stop]"
</CODE>
I would get:<BR>
<CODE>
"my text and maybe more text the end"
"my text and here's more text the end"
"my text and maybe more text stop"
"my text and here's more text stop"
</CODE>
and given:
<CODE>
"my text [[and|or] maybe|and here's] more text"
</CODE>
I want:<BR>
<CODE>
"my text and maybe more text"
"my text or maybe more text"
"my text and here's more text"
</CODE>
(all characters except [ ] | should be just treated like text)<BR>
Something like this must exist - anyone know where?<BR>
thanks<BR>
Daniel<BR>