http://qs321.pair.com?node_id=667070


in reply to Matching set of paragraph tags with string inside.

I try to avoid getting too tricky with regexes, because I am a bear of little brain. I'd break the string up then inspect it in pieces, perhaps like this:

my @arr = split /<\/p>/, $string; @matches = grep { /\[tab\]/ } @arr;

one extra line but much easier for me. If I was concerned about it looking neat, I'd put the code inside a subroutine called match_tabs().

___________________
Jeremy
I didn't believe in evil until I dated it.