Elegant (like robust) is frequently a very subjective thing. (Maybe that tells you who I am IRL?)

Just negate where desired and leave it at that. That's why !~ is included in the language, after all.


In reply to Re: Negation/Complement of a Regex by gloryhack
in thread Negation/Complement of a Regex by geekondemand

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":