Re: Regex - how to match until something
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.php archive

Re: Regex - how to match until something

From: Mladen Gogala <gogala@sbcglobal.net>
Date: Sun Apr 30 2006 - 06:27:40 CEST

On Sat, 29 Apr 2006 13:46:31 -0700, veg_all wrote:

> How do you replace an occurence until a certain point: You can see my
> example code below and the output:

Would something like this:

$string1 = preg_replace ( '/Hello.*(today)/', 'Hello *** $1' , $string1);

be what you're looking for?

-- 
http://www.mgogala.com
Received on Mon May 1 03:07:44 2006