jakarta-oro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peter_shil...@firstbs.com
Subject Perl5 vs Awk: what's the problem in this regex?
Date Fri, 20 Jul 2001 11:56:38 GMT


Hi there,

I'm not an experienced 'regex-er', so don't laugh when you see my pattern :-)

I tried to use a regex to match valid e-mail addresses. I used:

((\w+\.\w+|\w+)+)\@((\w+\.\w+|\w+)+)

I tried this with Perl5 matching on the e-mail address:

whats.going.on@someplace123.co.uk

and it failed. When I tried Awk matching however, it succeeds.

Why is this? I would expect the behaviour to be the same and for the regex to
match the e-mail address above.

Any idea why it doesn't work for Perl5?

Thanks,

Peter.


********************************************************************************
The information contained in this message is confidential and is intended for
the addressee only.  If you have received this message in error or there are any
problems please notify the originator immediately.  The unauthorised use,
disclosure, copying or alteration of this message is strictly forbidden.  This
mail and any attachments have been scanned for viruses prior to leaving the Bank
of Scotland Group network. Bank of Scotland Group will not be liable for direct,
special, indirect or consequential damages arising from alteration of the
contents of this message by a third party or as a result of any virus being
passed on.

Bank of Scotland Group reserves the right to monitor and record e-mail messages
sent to and from this address for the purposes of investigating or detecting any
unauthorised use of its system and ensuring its effective operation.
********************************************************************************



Mime
View raw message