![]() |
Available news archives:
comp.lang.tcl
-
comp.lang.python
-
comp.security.firewalls
-
sci.crypt -
comp.lang.php -
comp.lang.javascript
|
|
comp.lang.php archiveRegex - how to match until something
From: <veg_all@yahoo.com>
Date: Sat Apr 29 2006 - 22:46:31 CEST
How do you replace an occurence until a certain point: You can see my
$string1 = 'Hello world today';
$string1 = preg_replace ( '/Hello.*(?!today)/', 'Hello ***' , $string1
echo "$string1 - This should be Hello *** today\n";
Outputs:
|