[cisco-voip] Destination Pattern Question

Jason Burton jburton at NETechCorp.com
Mon Feb 5 17:48:24 EST 2007


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
	
	
	





More information about the cisco-voip mailing list