ASA RegEx Match

Unanswered Question
Jun 12th, 2010
User Badges:

Hi All,

I've configured a FTP inspect policy-map, within the policy map I'm using the match filename command to identify certain files

regex test ^cisco.*

policy-map type inspect ftp FTP_PMAP

match filename regex test


The problem I have is that the regex above does not work but the regex below does.

regex test2 cisco.*

filenames are in the format cisco1.txt, cisco2.txt etc....

Any ideas?  the ASA is running version 8.2(2)

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Marcin Latosiewicz Sun, 06/13/2010 - 02:11
User Badges:
  • Cisco Employee,


Did a short test.

^cisco.* should match anything begining with "cisco" followed by any number of characters.


ciscoasa# test regex cisco2.txt ^cisco.* 
INFO: Regular expression match succeeded.
ciscoasa# test regex 1_cisco2.txt ^cisco.*
INFO: Regular expression match failed.


If you want to match the ciscoX.txt files


ciscoasa# test regex cisco2.txt cisco[0-9]\.txt
INFO: Regular expression match succeeded.

Theory is regexps in test and in policy maps should be working same way ... provided no extra characters are added.


This Discussion