RegEx Help Needed

Unanswered Question
Aug 6th, 2010

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?

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Kureli Sankar Fri, 08/06/2010 - 15:55

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

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


Magnus Mortensen Fri, 08/06/2010 - 19:57


     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


This Discussion