cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
335
Views
0
Helpful
4
Replies

non-capturing REGEX in 9800 WLC

We are building an AP regex for our AP's so that they can be assigned to a different site-tag.

Our AP naming convention is like this: <SER name>-<FLOOR>-<NUMBER>

We want to only match on the FLOOR number.

As far as I understood  you can achieve this with non-capturing groups.

The regex would look like this:

(?:\w{2})-(00)-(?:\d{3})

The only problem is that the ? sign is not allowed in IOS-XE

Is there anyone who knows how to achieve this?

4 Replies 4

marce1000
VIP
VIP

 

          - Try typing  Ctrl-V before the question mark ,

 M.



-- Each morning when I wake up and look into the mirror I always say ' Why am I so brilliant ? '
    When the mirror will then always repond to me with ' The only thing that exceeds your brilliance is your beauty! '

okay so you mean the regex would look like this?

(Crtl-V?:\w{2})-(00)-(Crtl-V?:\d{3})

 

 

  - Try to use the mentioned sequence as an escape character ,

 M.



-- Each morning when I wake up and look into the mirror I always say ' Why am I so brilliant ? '
    When the mirror will then always repond to me with ' The only thing that exceeds your brilliance is your beauty! '

as I am not that familiar with regex so can you post an example regex for this? 

Currently I have solved this like this:

^\w{2}-12- 

for the 12th floor for example.

I think that is also a solution. But if you can explain how to achieve this with the capturing groups than I am still curious how to do it. 

Review Cisco Networking for a $25 gift card