On Jan 23, 2008 6:38 AM, Ana <[EMAIL PROTECTED]> wrote:
> Hello People..
> How I recover doesn't match regular expression???
>
> I have one regular expression that return the match.. bu i would like
> recover the doesn't macth
> How?
snip

If I understand you correctly, then all you need to do is expand the
regex to match the parts it didn't match before.  So given /(bar)/ and
the string "foo bar baz" you will only capture "bar", but you can
expand the match to include "foo " and " baz" like this
/(.*)(bar)(.*)/.  This behaves similarly to $`, $&, and $' without
their performance penalty being applied to every regex in your
program.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to