Reply

REGEX for building inventory by name

Member
Posts: 1
3192     0

I'm trying to build device groups based on name. For example my routers/seitches are name 4xxxdrxx (x=numbers).  the regex I'm trying is as follows;

 

$Name like /^4[0-9][0-9][0-9].*/

 

 

This doesnt weam to work.

Re: REGEX for building inventory by name

Expert
Posts: 239
3193     0

What you wrote should work, although you can simplify it a bit to /^4\d\d\d.+/

 

Try yours in an online regex tester like https://regex101.com/.

Showing results for 
Search instead for 
Did you mean: 

Recommended for You