Configure HTML/JavaScript

Thursday, January 20, 2011

Searching non alpha numeric character through REGEX through PHP

Hi,
you can search non-alpha numeric characters by simple adding a negation regex charactor in the regex string (^).

below is the Example

preg_replace('/[^A-Za-z0-9_]/', '', 'D"usseldorfer H"auptstrasse');

Thanks

in reference to: Aniruddh (view on Google Sidewiki)

No comments:

Post a Comment