[cisco-voip] Destination Pattern Question
Jonathan Charles
jonvoip at gmail.com
Mon Feb 5 17:58:36 EST 2007
That page is wrong.
For the example given:
The route pattern 813510[^0-5] routes or blocks all numbers in the range
8135106 through 8135109.
This should block all patterns 8135100 through 8135105.
Because the pattern, [^0-5] says NOT anything that has 0 through 5 in that
position...
Here are the other examples I have from Cisco:
[^756] matches anything that begins with a 5 or 6
[^4][^5][^6] matches the string 456
Now, I do not have an exact match for the [^0-5] but it indicates to me
that, following the patterns above, it should NOT match the range 0 through
5.
Someone correct me if I am wrong.
Jonathan
On 2/5/07, Jason Burton <jburton at netechcorp.com> wrote:
>
> You are correct the ^ character matches every but whats contained.
>
> Looking in the 4.1(3) system guide you will find the following
>
> The circumflex (^) character, used with the square brackets, negates a
> range of values. Ensure that it is the first character following the opening
> bracket ([).
>
> Each route pattern can have only one ^ character.
>
> The route pattern 813510[^0-5] routes or blocks all numbers in the range
> 8135106 through 8135109.
>
>
> http://www.cisco.com/en/US/products/sw/voicesw/ps556/products_administration_guide_chapter09186a00803edabe.html#wp11697
>
>
>
>
> ________________________________
>
> From: cisco-voip-bounces at puck.nether.net on behalf of Jonathan Charles
> Sent: Mon 2/5/2007 5:34 PM
> To: CarlosOrtiz at bayviewfinancial.com
> Cc: cisco-voip
> Subject: Re: [cisco-voip] Destination Pattern Question
>
>
>
> The first two regular expression characters I learned were ^ and $
> (beginning and ending of a string)... (BGP).
>
> To be honest, I can't see how someone could say that the ^ means NOT...
>
> However, I just found this:
>
> [^ ] Matches a single character that is not contained within the brackets.
> For example, [^abc] matches any character other than "a", "b", or "c".
> [^a-z] matches any single character that is not a lowercase letter.
>
> So, we are wrong, they are right... we suck.
>
>
>
>
> Jonathan
>
>
> On 2/5/07, CarlosOrtiz at bayviewfinancial.com <
> CarlosOrtiz at bayviewfinancial.com> wrote:
>
> I agree with your assessment. Just trying to confirm to convince
> others.
>
>
> ________________________________
>
> ----- Original Message -----
> From: "Jonathan Charles" [jonvoip at gmail.com]
> Sent: 02/05/2007 04:25 PM CST
> To: Carlos Ortiz
> Cc: cisco-voip at puck.nether.net
> Subject: Re: [cisco-voip] Destination Pattern Question
>
>
>
> The ^ matches the beginning of a string.
>
> The [ ] match a range.
>
> So, my thinking would be that the [^9] should match anything that
> begins with a 9
>
> However, so would:
>
> 9...
>
> To match the not-9 do this:
>
> [1-8]...
>
>
>
> Jonathan
>
>
> On 2/5/07, CarlosOrtiz at bayviewfinancial.com <
> CarlosOrtiz at bayviewfinancial.com <mailto:CarlosOrtiz at bayviewfinancial.com>
> > wrote:
>
>
> Can someone confirm what this statement does? It was
> added with the idea that everthing will match except anything beginning with
> 9. From what I read it looks like it will match all ext's beginning with 9.
>
> destination-pattern [^9]...
>
> Carlos
> _______________________________________________
> cisco-voip mailing list
> cisco-voip at puck.nether.net
> https://puck.nether.net/mailman/listinfo/cisco-voip
>
>
>
>
>
> _______________________________________________
> cisco-voip mailing list
> cisco-voip at puck.nether.net
> https://puck.nether.net/mailman/listinfo/cisco-voip
>
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://puck.nether.net/pipermail/cisco-voip/attachments/20070205/199a2b76/attachment.html
More information about the cisco-voip
mailing list