Re: just looking for some opinions...
| From: | Curt Zirzow | Date: | Thu, 24 Jul 2003 18:23:48 +0000 |
| Subject: | Re: just looking for some opinions... | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-156709@lists.php.net to get a copy of this message | ||
* Thus wrote Dan Joseph (djoseph@duhq.us):
> Hi,
>
> > > Let's say I have a number: 12800001924
> > >
> > > The rules call for removing "1280+", meaning remove 128 and all 0's
> > > that
> > > come after it, until you run into another number.
> > >
> > > In the end, it would leave 1924, and everything else on the beginning
> > would
> > > be gone.
> >
> > $new_number = preg_replace('/^1280+/','',$number);
>
> Now, since I'm only about 25% up to par with RegEx, can anyone point me to
> a good site that explains them? I've got a couple more things to do on the
> number processing, but I don't want to sit here all day and keep posting
> them as I come along, so I'm want to RTM...
you probably have 3 other emails in your INBOX telling you this,
but I wouldn't know cause they arn't posting to the list....
anyway so everyone knows...
PHP has put together some nice documentation on this:
http://us4.php.net/manual/en/pcre.pattern.modifiers.php
http://us4.php.net/manual/en/pcre.pattern.syntax.php
Curt
--
"I used to think I was indecisive, but now I'm not so sure."