I\'d like a regexp or other string which can replace everything except alphanumeric chars (a-z and 0-9) from a string. All things such as ,@#
a-z
0-9
,@#
I like using [^[:alnum:]] for this, less room for error.
preg_replace('/[^[:alnum:]]/', '', "(ABC)-[123]"); // returns 'ABC123'