> -----Original Message-----
> From: Chris Rogers [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, August 30, 2001 4:38 PM
> To: Beginners@Perl. Org (E-mail)
> Subject: RE: Confusion with Regular Expressions
> 
> 
> OK.  I have tried so many but haven't kept very good track of them.  
> 
> Original string:
> ("APPLICATION" "MSWORD" ("name" Liste des numéros de 
> téléphone.doc) NIL NIL
> "BASE64" 61658 NIL ("attachment" ("filename" Liste des numéros de
> téléphone.doc)) NIL)
> 
> I need to surround the
> Liste des numéros de téléphone.doc
> with quotes
> 
> This one came closer than any other but it is still wrong:
> s/" ([a-zA-Z0-9_\. ]+)\)/" "$1"\)/g
> 
> If I remove the \) at the end of the left side, it comes 
> really close.  I
> think it is the é that is throwing it off but I don't know 
> how to include
> that in the character class.  For all I know there may be 
> more problems than
> that and definately a better way of doing it since I 
> obviously have not
> included enough characters in the character class.

How about just using a class consisting of anything except
what you don't want:

   s/" ([^")]+)\)/" "$1")/g

The ^ after the opening bracket negates the character class.

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to