Showing results for 
Search instead for 
Did you mean: 

Cisco Community Designated VIP Class of 2020


VCS Regex help, Matching on anything that Doesn't lead with 11 or more digits



I've created some pretty complex regex in my day but this one has me stumped.


In an effort to stop toll fraud attempts, I would to change a search rule on my VCS-E from "any alias" to a regex which will match "anything that does not lead with 11 digits".


First I tried with: [^\d{10,}] but you can't use special characters inside the [] as they are taken literally.


I've tried using the Negative lookahead: (?!\d{11,}) and tried with the ^ in there: (?!^\d{11,})

No luck there either.


Any ideas?



Everyone's tags (1)

Do you want to limit the

Do you want to limit the number 11 specifally, or any repitition of the number 1?

I just tested, and if you want to prevent calls from just the number 11, you can use (?!11).*, it's a negative lookahead.  if you want to limit a scope of numbers, than it might take some more work, that is if it's possible.


Patt, I'm not looking to


Thanks for your reply.


I'm not looking to limit the number 11 or 1, but rather 11 or more digits.

So a dial of 1234567890@domain would pass the traversal zone, but a dial of 12345678901@domain would not.


Right now I set a transform to match on anything 11+ digits: \d{11,}.* and replace with TollFraud

Then in my traveral search rule I use the forward lookup (?!TollFraud).* to skip anything that leads with TollFraud.

It works but I wanted it to be cleaner with a single rule. 

You can try setting your

You can try setting your search rule to use (?!\d{11}).*, this will match anything that is under 10 numbers, anything 11 or over the match will fail.  Since the match will fail, it should prevent the search.


Ah!I figured it out!(?!\d{11,


I figured it out!



Looks like I needed the .* on the back to match the rest of the dial attempt, doh!



Good!  You beat me to it, I

Good!  You beat me to it, I hit reply right as your message came in.

Remove the , that is in your

Remove the , that is in your regex though.



I need the , as {11} is 11

I need the , as {11} is 11 and {11,} is "11 or more" which I learned today from:



Re: Ah!I figured it out!(?!\d{11,

Hello jjlatessa/Patrick,


I want to implement similar changes in my expressway to avoid toll fraud, only 2-7 digit allowded followed by uri/IP ( Eg. 3232323@  or .


can you please help me out.


Currenlty we are using below rules in Expressway E - > attached.


Please share me snap if possible .

CreatePlease to create content
Content for Community-Ad
FusionCharts will render here