THANK YOU! THANK YOU! THANK YOU!  That did the trick.  I didn't think about
that as a possibility.  
I have another question now.  How would I go about defining ascii characters
that are not on my keyboard in the character class?  There must be a way of
defining a character class using the ascii values instead of the actual
character.  I just don't know how to do it.

Thanks,
Chris


-----Original Message-----
From: Bob Showalter [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 30, 2001 4:49 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Confusion with Regular Expressions


> -----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]

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

Reply via email to