Re: HELP: Regex pattern matching

From: Date: Thu, 23 Jan 2003 15:49:05 +0000
Subject: Re: HELP: Regex pattern matching
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-132848@lists.php.net to get a copy of this message
Thanks indeed! This pattern worked just perfect. Nasko "1lt John W. Holmes" <holmes072000@charter.net> wrote in message news:00e601c2c2e0$0c204720$a629089b@TBHHCCDR... > If the separators are always the same length, then you can use the > following: > > $new_str = preg_replace("/(=-){5}(.*)-{10}/sU","",$str); > > Where 5 is how many times the =- pattern repeats, and 10 is how many times > the - character repeats. > > Hope that helps. > > ---John Holmes... >

« previous php.general (#132848) next »