Re: [PHP] Quick ereg_replace question

2003-12-02 Thread Lowell Allen
> 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. Try listing the - as th

[PHP] Quick ereg_replace question

2003-12-02 Thread Grant Rutherford
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 re