Searching for numeric values in PHP
........remove please
|
http://in2.php.net/manual/en/function.preg-replace.php
should do it. I think ' $string = 'input text'; $pattern = '/(\w+) (\d)(\d)(\d+)(\w+)/i'; $replacement = '${1}1337$3$4'; echo preg_replace($pattern, $replacement, $string); |
A reverse engineering problem...
We have the answer, but what was the question? ;) |
Since the answer was not '42', the question was not "What is the meaning of life and everything?"
OTOH, maybe there were more answers to that question, and this might be one of them. jlinkels |
Well I believe that there is overwhelming evidence that the answer is 42 but as we know the answer is never as interesting as the question.
|
iirc
he wanted to replace <text+><digit><digit><more digits><moretext> with <text+><digit><digit>1337<moredigits><more text> |
All times are GMT -5. The time now is 09:17 AM. |