Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

RegEx Help Needed

I'm trying to write a regular expression to block files with the extension of .lnk, but I can't get the end of line anchor ($) to work.  So far I've come up with "\.[Ll][Nn][Kk]" and that blocks "test.lnk" but it also blocks "test.lnk.txt".  I tried "\.[Ll][Nn][Kk]$" but it doesn't work.  What am I doing wrong?

2 REPLIES
Cisco Employee

Re: RegEx Help Needed

I hope this helps. I found the following sample in the link below:

http://www.cisco.com/en/US/products/ps6120/products_configuration_example09186a0080940e04.shtml#cre

regex urllist1 ".*\.([Ee][Xx][Ee]|[Cc][Oo][Mm]|[Bb][Aa][Tt]) HTTP/1.[01]"


!--- Extensions such as .exe, .com, .bat to be captured and
!--- provided the http version being used by web browser must be either 1.0 or 1.1

-KS

Cisco Employee

Re: RegEx Help Needed

Terry,

     The ASA/PIX Regex engine does not suppor the end of string anchor ($). Bug CSCsm89915 has been filed as an enhancement to get this functionality into the regex engine. Unfortunately there has been no movement on that enhancement sine 2008. If this is something that would be helpful in your production environment, please contact your account team (if applicable) so they can help drive this bug.

- Magnus

246
Views
5
Helpful
2
Replies
CreatePlease to create content