I believe there should be a "?" to match only up to the first thing that
looks like the end of the searched match:

        /Blk[\. ]\d{3}.*?E\d{3}a?\d{4}/

- Lennart


> -----Original Message-----
> From: Andrew Bastien [mailto:[EMAIL PROTECTED]]
> Sent: fredag, april 28, 2000 16:59
> To: Perl-Win32-Users Mailing List
> Subject: RE: How to say: match this..."UNTIL..." in RegExp
> 
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> 
> I'm not sure that I understand exactly what you're looking 
> for, but does this do it?
> 
> /Blk[\. ]\d{3}.*E\d{3}a?\d{4}/
> 
> - -----Original Message-----
> From: Jimmy S. Lim [mailto:[EMAIL PROTECTED]]
> Sent: April 28, 2000 8:34
> To: Perl-Win32-Users Mailing List
> Cc: Peter Van Hoecke
> Subject: How to say: match this..."UNTIL..." in RegExp
> 
> 
> hi all!
> thanks in advance, can anybody help me translate english to perl? :o)
>  
> i would like to write in perl language:
>  
> if (m/Blk\.*\s*\d{3}.*(?!E\d{3}-*\d{4})/i)
> 
> i want to tell Perl this in english: 
> " find Blk followed by a period or a space, followed by 3 
> digits, and followed by any character or characters along the 
> way UNTIL (then stop) you find an E with 3 digits plus a - or 
> w/o a - followed by 4 digits, then return the match.
> 
> but i still get return of everything. Perl seems to ignore my 
> ?! negative look ahead. is this because of the * i have? how 
> do i solve this?
> 
> jimmy
> 
> -----BEGIN PGP SIGNATURE-----
> Version: PGPfreeware 6.5.2 for non-commercial use <http://www.pgp.com>
> 
> iQA/AwUBOQmlvz1j58pgs53KEQITXwCdGyPOjeUqzQXFFunlqIlkMjuTCjwAoOPp
> 5PFM+L6j2KujUJ+fbpVj6zWQ
> =rsQ3
> -----END PGP SIGNATURE-----
> 
> ---
> You are currently subscribed to perl-win32-users as: 
> [EMAIL PROTECTED]
> To unsubscribe, forward this message to
>          [EMAIL PROTECTED]
> For non-automated Mailing List support, send email to  
>          [EMAIL PROTECTED]
> 

---
You are currently subscribed to perl-win32-users as: [[email protected]]
To unsubscribe, forward this message to
         [EMAIL PROTECTED]
For non-automated Mailing List support, send email to  
         [EMAIL PROTECTED]

Reply via email to