The stupid question is the question not asked | |
PerlMonks |
Re^2: Negating Regexes: Tips, Tools, And Tricks Of The Tradeby ikegami (Patriarch) |
on Dec 07, 2006 at 16:33 UTC ( [id://588388]=note: print w/replies, xml ) | Need Help?? |
Very good, but that can't be embedded into another regexp nicely. The equivalent to /[^$chars]*/ is /(?:(?!$re).)*/. /[^$chars]*/ matches as many characters as possible, as long as none match the character class.
A "few" example uses: Re^3: reg ex NOT, Re^3: Text::Balanced with nested / custom brackets, Re^2: regex for negating a sequence, Re: Regexp: Match anything except a certain word, Re^2: Regexp: Match anything except a certain word, Re: regex help please, Re: Extraneous behaviour of match variables, Re: How to split into paragraphs?, Re^3: How to split into paragraphs?, Re: text extraction question, etc. Notes:
Updated: Fixed formatting, added stuff
In Section
Seekers of Perl Wisdom
|
|