Any numbers, but only 3 digits in the string.

I'm filtering out local extention numbers from phone numbers

Where in the log the extension is 104 and the phone number would be
something like PSTN0/2-0115070545. All the stuff I have tried have
returned  would return both the extension number and 3 digits from the
phone number eg 011 .

So I only want the records that beginning  and end in a number and
have exactly 3 digits not longer.

Thanks for you time.
G


On Tue, Sep 15, 2009 at 9:52 AM, Tim Bowden <tim.bow...@mapforge.com.au> wrote:
> On Tue, 2009-09-15 at 09:30 +0200, Gregory Machin wrote:
>> Hi
>>
>> I'm look for code example that will only select a string containing 3
>> digits .. The string cant be less than 3 digit , can't be more than 3
>> and can't contain any other characters.
>>
>> I have googled and found code that will find 3 consecutive digits
>> within a string or at the beginning.
>>
>> Any ideas ?
>> Thanks
>> G
>>
>
> So you want a regex that will identify a three digit string (any 3
> digits or 3 specified digits?) and anchor to both the start and end of
> the string?
>
> Tim Bowden
>
>
> --
> To unsubscribe, e-mail: beginners-unsubscr...@perl.org
> For additional commands, e-mail: beginners-h...@perl.org
> http://learn.perl.org/
>
>
>

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to