RE: [PHP] str_replace question

2003-09-10 Thread SLanger
> preg_replace('/*\<[a-z]+)[0-9]+(\>)/', '$1$2', $String); Ok why not simply use reg_replace('//', '//', $String); BTW preg regex are more powerfull since they support some stuff that the posix standard does not support. As far as I know lookbehinds and lookbacks and stuff like that. Also the PO

RE: [PHP] str_replace question

2003-09-09 Thread Robert Cummings
I think (and don't quote me on this, and feel free to correct me :) that preg_replace() is fast being based on perl regular expressions. ereg_replace() however, follows the POSIX standard for regular expression matching. Cheers, Rob. On Tue, 2003-09-09 at 17:36, Wouter van Vliet wrote: > $String

RE: [PHP] str_replace question

2003-09-09 Thread Wouter van Vliet
$String = ""; preg_replace('/*\<[a-z]+)[0-9]+(\>)/', '$1$2', $String); will most likeley do. Btw, does anybody know why preg_replace is adviced over ereg_replace in the manual? .. and if ereg_replace doesn't have any advantages over preg_replace, couldn't this function get depricated? -> -O

Re: [PHP] str_replace question

2002-04-16 Thread Andrey Hristov
preg_replace('/\d+/','',$the_string); Hope this helps. Andrey - Original Message - From: "Andras Kende" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, April 16, 2002 4:29 AM Subject: [PHP] str_replace question > Is a nicer way to remove any number 1-0 from a string??? >

Re: [PHP] str_replace question

2002-04-15 Thread Justin Blake
"Andras Kende" <[EMAIL PROTECTED]> wrote: > Is a nicer way to remove any number 1-0 from a string??? > > Currently: > $metakeywords=str_replace("1",'',strtolower($metakeywords)); > $metakeywords=str_replace("2",'',strtolower($metakeywords)); > $metakeywords=str_replace("3",'',strtolower($metakey