Syntactic Confectionery Delight | |
PerlMonks |
matchin a string inside of another stringby Anonymous Monk |
on Apr 05, 2004 at 04:10 UTC ( [id://342566]=perlquestion: print w/replies, xml ) | Need Help?? |
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
lets say i have a string "bla foo bar letters stuff qwerty" and I need everything between bla and qwerty, but i also need to be able to match "bla foo qwerty" and "bla foo bar bla oontz letters meh stuff qwerty" what is the simplest regex necessary to do this as i currently have /(\w*?\s*?\w*?\s*?\w*?\s*?\w*?\s*?\w*?\s*?\w*?\s*?)/ and that is ugly.
Back to
Seekers of Perl Wisdom
|
|