ASA RegEx Match
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2010 04:02 PM - edited 03-11-2019 10:58 AM
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)
- Labels:
-
NGFW Firewalls

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2010 02:11 AM
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.
