Is there a regular expression to indicate a string you're looking for
and one you're not looking for? 

Example: You want to find all the Smiths in a list but not Smith, John.
So if you read each record from the list, the pseudo code would be
something like:

$phone_book_entry=~m/^Smith.+?not(John)/


$phone_book_entry=~m/^Smith, [^J][^o][^h][^n]/ works but can be
cumbersome for long strings. Also if you don't know that ", " is always
between the last and first name (Smith Jr., John) and use .*?, it
breaks.

Is there a real re that will do this?

Thanks

 
Mark Edwards 
HP Services     
Technical Solutions Group       
 <http://www.hp.com/>    Hewlett-Packard Company
        
CXO01-3/N13     
301 Rockrimmon Blvd. South      
Colorado Springs, CO 80919-2398         
Voice: (719) 592-5363           
Email: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>     

_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to