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('/ques[0-9][0-9]/', '/ques/', $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

[PHP] str_replace question

2003-09-09 Thread Al
I've got a simple expression quesxx where xx is a number from 0 to 99. I want to replace it with simply ques. That is, I want to remove the numbers. Will str_replace do it, or must I use ereg_replace? I haven't figured out from reading the php manual on regular expression how to do this

RE: [PHP] str_replace question

2003-09-09 Thread Wouter van Vliet
? - -Oorspronkelijk bericht- - Van: Al [mailto:[EMAIL PROTECTED] - Verzonden: dinsdag 9 september 2003 23:21 - Aan: [EMAIL PROTECTED] - Onderwerp: [PHP] str_replace question - - - I've got a simple expression quesxx where xx is a number - from 0 to 99. - - I want to replace it with simply

RE: [PHP] str_replace question

2003-09-09 Thread Robert Cummings
? - -Oorspronkelijk bericht- - Van: Al [mailto:[EMAIL PROTECTED] - Verzonden: dinsdag 9 september 2003 23:21 - Aan: [EMAIL PROTECTED] - Onderwerp: [PHP] str_replace question - - - I've got a simple expression quesxx where xx is a number - from 0 to 99. - - I want to replace

[PHP] str_replace question

2002-09-01 Thread Gregor JakĀ¹a
Hello, i have array $reserved_words which i want to replace with bold .. but when i tried to do str_replace($reserved_words, b.$reserved_words./b, $string) it showed Array instead of bword/b if i simply do str_replace($reserved_words, $reserved_words, $string) then it shows the words not Array

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

[PHP] str_replace question

2002-04-15 Thread Andras Kende
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($metakeywords));

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($metakeywords));