Welcome to WebmasterWorld Guest from 18.104.22.168
Let's say I wish to take an input field which is a phone number, and strip out everything that is not a number or a space. For instance...
(01234) 567890 would become 01234 567980 (not 01234567890).
I just don't know how to configure the POSIX part of the ereg_replace statement. I've tried about a bazillion approaches but have come up empty.
Should be a quite simple one for you big-brains out there!
\d = digit
\s = space
^ not operator, when the first character inside a character class
 character class
+ one or more
Summary: replace one or more instances of anything not a digit or space in the string "$phone" with an empty string.