|
Posted by FFMG on 08/15/06 08:15
Martin Larsen wrote:
> It sounds easy to make the regex, if I just could understand what you
> want :-)
>
> Please try to explain it again!
Sorry about that.
As an example lets say I want to replace the number "10" with "ten"
If I do preg_replace( "/10/", "ten", $text ) I run the risk of anything
containing the digits "10" been replaced.
For example "100" would become "ten0"
So I need to look for the number '10' alone, meaning that if it starts
or ends with a digit then it is another number. 109 would not qualify,
(because 9 is part of the number), but 10a would work as it is number
10 followed by 'a'.
FFMG
Navigation:
[Reply to this message]
|