Re: regexp problem
| From: | Joe Stump | Date: | Sun, 17 Dec 2000 18:55:20 +0000 |
| Subject: | Re: regexp problem | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-30752@lists.php.net to get a copy of this message | ||
Ok so you could have done str_replace(' foo ',' the ',$string); It is the same
thing then and it's still faster.
--Joe
On Sun, Dec 17, 2000 at 12:48:44PM +0000, Chris Jones wrote:
> Hi
>
> In article <20001216175823.B21270@zorka.com>, "Joe Stump"
> <joe@earth.care2.com> wrote:
>
> > it's quite a bit faster and just the same thing.
>
> It's not "just the same thing", the regexp "\Wfoo\W" only replaces
> "foo"
> where it's a whole word, str_replace(); would replace "foobar", which I
> don't want.
> Thanks for the suggestion anyway - fortunately I managed to fix the
> problem, I think I must have had a typo or something.
>
> --
> _____ _ _ _____
> | __ | |___ ___| |_ ___| __|_ _ ___ Chris "Ng" Jones
> | __ -| | .'| _| '_|___|__ | | | | chris@black-sun.co.uk
> |_____|_|__,|___|_,_| |_____|___|_|_| www.black-sun.co.uk
> S o f t w a r e
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
---
Joe Stump
PHP Programmer
www.Care2.com