Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: searching for one or more instances of text between tagsby Skeeve (Parson) |
on Oct 13, 2015 at 08:14 UTC ( [id://1144645]=note: print w/replies, xml ) | Need Help?? |
For sure it should be possible. Not using one regexp though. But I think, you'd need to specify better what you regard "the same code block". But most importantly: Try consider using one of the modules created for parsing HTML/XML for tasks like this. I have learned that, in the long run, it is worth the additional effort of installing and learning it. s$$([},&%#}/&/]+}%&{})*;#$&&s&&$^X.($'^"%]=\&(|?*{% +.+=%;.#_}\&"^"-+%*).}%:##%}={~=~:.")&e&&s""`$''`"e
In Section
Seekers of Perl Wisdom
|
|