![]() |
Available news archives:
comp.lang.tcl
-
comp.lang.python
-
comp.security.firewalls
-
sci.crypt -
comp.lang.php -
comp.lang.javascript
|
|
comp.lang.php archiveRe: Regex - how to match until something
From: Mladen Gogala <gogala@sbcglobal.net>
Date: Sun Apr 30 2006 - 06:49:19 CEST
On Sun, 30 Apr 2006 02:55:54 +0200, Rik wrote:
> Read up on regexes.
Actually, there is no need to put (.*) within the parenthesis as you are
$string1 = preg_replace ( '/Hello.*(today)/', 'Hello *** $1' ,$string1);
would be a bit faster and use less memory.
-- http://www.mgogala.comReceived on Mon May 1 03:07:44 2006 |