View Single Post

  #3 (permalink)  
Old 05-19-2006
Alan Little
 
Posts: n/a
Default Re: ereg_replace question

Carved in mystic runes upon the very living rock, the last words of Andy
Jeffries of comp.lang.php make plain:

> Yes. The - sign isn't listed in the range (i.e. it would be
> [^0-9.\-]) so it will remove it from the output


In brackets, you only escape the [] characters themselves. Your expression
will allow the \ character in the string.

--
Alan Little
Phorm PHP Form Processor
http://www.phorm.com/
Reply With Quote