
February 4th, 2009, 03:31 PM
|
|
|
|
Combining these 2 REGEX into 1 nice one?
Does anyone know if the following 2 regex can be joined into 1?
Code:
$string = preg_replace("/\* /","[^\s]*[[:>:]] ",$string);
$string = preg_replace("/\*$/","[^\s]*",$string);
The preg_replace turns the following strings...
into...
Code:
hell[^\s]*
hell[^\s]*[[:>:]] world
|