Page 1 of 1

Simple Regex needed

Posted: Tue Feb 26, 2008 9:04 pm
by aliasxneo
I'm not very good with Regex and couldn't fine a quick way to do this. I just need to replace all (will be doing this in php with preg_replace) non-character or numerals in a string. So anything not A-Z, a-z, or 0-9 should get replaced. How can I do this? Thanks in advance.

Re: Simple Regex needed

Posted: Tue Feb 26, 2008 9:07 pm
by superdezign

Code: Select all

[^A-Za-z0-9]

Re: Simple Regex needed

Posted: Tue Feb 26, 2008 11:09 pm
by aliasxneo
superdezign wrote:

Code: Select all

[^A-Za-z0-9]
Thank you :)