Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
If the tags are associated with the word directly following them (without any intervening whitespace), then you could split the sentence on whitespace and then split of each tag from the word following it. It would then be trivial to build a data-structure you could use as a basis to put the tags back in after the regex has done its thing with the "untagged" sentence. CountZero "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law In reply to Re: Re: Skipping special tags in regexes
by CountZero
|
|