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

ASA RegEx Match

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

   reset

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 REPLY
Cisco Employee

Re: ASA RegEx Match

Peter,

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.

311
Views
0
Helpful
1
Replies