Hi,

I need a regular expression which will eliminate all characters except numbers, period, and +, -, *, or /

I am currently using:
$new_value = ereg_replace('[^0-9\.-/+*]', "", $value);

However, this seems to eliminate - as well. Any help would be appreciated.

Also, any good references for regular expressions?

Thanks,
Grant

--
Grant Rutherford
Iders Incorporated

100-137 Innovation Drive
Winnipeg, MB, Canada R3T 6B6

http://www.iders.ca
tel: 204-779-5400 ext 36
fax: 204-779-5444
================================
Iders Incorporated: Confidential
================================
Note: This message is intended solely for the use of the designated
recipient(s) and their appointed delegates, and may contain
confidential information.  Any unauthorized disclosure, copying or
distribution of its contents is strictly prohibited.  If you have
received this message in error, please destroy it and advise the sender
immediately by phone, Email or facsimile.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to