- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2022 01:28 PM
Hello
I have a customer who has decided to use a location prefix and a function suffix for AP naming on their Cisco 9800.
For example:
EU-Site2-AP20-Root
EU-Site2-AP21-MAP
I am now trying to create AP-filters for this and i want to match on:
"Site2" and "Root" in AP filter rule 1
"Site2" and "MAP" in AP filter rule 2
I am not skilled at all in REGEX, so i can only do the basics like ^ for matching the beginning of a string, $ for matching the end of a string, | for matching one or the other etc.
Basically, can someone help me create a one-liner REGEX with an "AND" operator, that will work in 9800?
"?" as a character is not allowed for REGEX in the 9800... Not in the GUI at least...
Best Regards
Frederik
Solved! Go to Solution.
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2022 03:47 PM
Try this one then
((Site2).*(Root))
Replace the Site2 and Root with the site and mesh type
*** Please rate helpful posts ***

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2022 03:09 PM
Try this:
^(?=.*\bSite2\b)(?=.*\bRoot\b).*$
Replace Site2 and Root with the 2 variables you wish to match
The expressions in parentheses starting with ?= are the positive lookaheads. I'll break down the pattern:
- ^ asserts the start of the expression to be matched.
- (?=.*\bSite2\b) is the first positive lookahead saying that what follows must match .*\bSite2\b.
- .* means any character zero or more times.
- \b means any word boundary (white space, start of expression, end of expression, etc.).
- Site2 is literally those four characters in a row (the same for Root in the next positive lookahead).
- $ asserts the end of the expression to me matched.
Useful Regex tester here https://regex101.com/
*** Please rate helpful posts ***
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2022 01:06 AM
Hello Haydn
Thank you for your reply!
Have you had the possibility to try out that REGEX on a Cisco 9800 WLC?
I have tried using "?" as a character in my REGEX, but the Cisco 9800 WLC will not accept "?" as a character, because ? is used in the syntax for CLI to look up command possibilities like "Show ip ?" to look up the possible keywords to use after "Show ip"...
- So if you try and use ? in your REGEX, you will get an error like the on the attached screenshot...
Do you know if there is another way of doing it, that doesn't involve "?" as a character?
Best Regards
Frederik

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2022 03:47 PM
Try this one then
((Site2).*(Root))
Replace the Site2 and Root with the site and mesh type
*** Please rate helpful posts ***
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2022 02:23 PM
Hello Haydn
Again, thank you for your reply!
The 9800 seems to be OK with that REGEX one-liner!
I will try it out once I am back at the customer site and able to test
Best Regards
Frederik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2022 03:24 AM - edited 04-21-2022 03:25 AM
Hello Haydn
I have now had the chance to test out the above mentioned REGEX one-liner in the customer environment...
- And it works!
So now i have successfully configured all the RAP's and MAP's using separate rules from the rules configuring the AP's inside the building and all AP's are getting the correct tags!
Thank you very much for your help!
Best Regards
Frederik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2022 04:38 AM
What version of code? Have you tried 17.6.3? (not that I know of any specific fix but lots of general improvements)
Also try using the original in quotes ""
Try configuring on CLI? (again also using quotes)
Also note there's an enhancement (feature request) bug raised https://bst.cloudapps.cisco.com/bugsearch/bug/CSCvz84973
Please click Helpful if this post helped you and Select as Solution (drop down menu at top right of this reply) if this answered your query.
------------------------------
TAC recommended codes for AireOS WLC's and TAC recommended codes for 9800 WLC's
Best Practices for AireOS WLC's, Best Practices for 9800 WLC's and Cisco Wireless compatibility matrix
Check your 9800 WLC config with Wireless Config Analyzer using "show tech wireless" output or "config paging disable" then "show run-config" output on AireOS and use Wireless Debug Analyzer to analyze your WLC client debugs
Field Notice: FN63942 APs and WLCs Fail to Create CAPWAP Connections Due to Certificate Expiration
Field Notice: FN72424 Later Versions of WiFi 6 APs Fail to Join WLC - Software Upgrade Required
Field Notice: FN72524 IOS APs stuck in downloading state after 4 Dec 2022 due to Certificate Expired
- Fixed in 8.10.196.0, latest 9800 releases, 8.5.182.12 (8.5.182.13 for 3504) and 8.5.182.109 (IRCM, 8.5.182.111 for 3504)
Field Notice: FN70479 AP Fails to Join or Joins with 1 Radio due to Country Mismatch, RMA needed
How to avoid boot loop due to corrupted image on Wave 2 and Catalyst 11ax Access Points (CSCvx32806)
Field Notice: FN74035 - Wave2 APs DFS May Not Detect Radar After Channel Availability Check Time
Leo's list of bugs affecting 2800/3800/4800/1560 APs
Default AP console baud rate from 17.12.x is 115200 - introduced by CSCwe88390
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2022 08:46 PM
Hello rrudling
Unfortunately i cannot upgrade past 17.3.x, since the customer still has some 2702 AP's which has to be taken into consideration.
I have not tried to configure the REGEX using CLI or ""
That feature request you have highlighted seems to be wanting to do the almost the same as i am trying to do
- Thanks! I will keep an eye out for this feature request to see if it gets a solution.
I will get back about the REGEX once i have had time at the customer during the week.
Best Regards
Frederik
