|
Posted by comp.lang.php on 12/06/05 21:16
Offensive Line:
[PHP]
$contents =
preg_replace('/([\s\t]*\*+[\s\t]*@[vV][eE][rR][sS][iI][oO][nN][\s\t]+)'
.. str_replace('/', '\\/', preg_quote($oldversion)) . '([\n\r\s\t]*)/e',
'$1' . $newversion . '$2', $contents);
[/PHP]
Bluntly put, I simply don't get it. It's bad enough that the RegExp
fails, but why would it break and why break in such a way that makes no
sense to anyone?
This is all I want to do:
REPLACE
* @version 1.0.0
WITH
* @version 1.1.0
Inside each non-binary file that contains that exact line pattern!
And that's all.
Thanx
Phil
Navigation:
[Reply to this message]
|