$foo =~ s/\W*/_/g;
http://www.oreilly.com/catalog/regex/
-----Original Message-----
From: Octavian Rasnita [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 03, 2002 3:06 AM
To: [EMAIL PROTECTED]
Subject: Replacing with Regular expressions
Hi all,
I have a path to a file name. (In a script for uploading files).
I want to allow only the a-z, A-Z, and 0-9 characters and I want to replace
all others with _ when writing the file to the server.
Can you tell me what would be this regular expression?
Thank you.
Teddy,
[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.365 / Virus Database: 202 - Release Date: 5/24/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.365 / Virus Database: 202 - Release Date: 5/24/2002
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]