How do I write a Regex to inspect Cisco Interfaces

Published on Tue Mar 01 2022

I am asking for help in writing a regular expression to shorten this expression. I need the string below to search every interface within the range of 1 -24 to validate the configuration. If one interface does not have the required configuration then the expression fails. interface GigabitEthernet1/***1 thru 24***.\n(.\n). description ** Unused Port **.\n(.\n). switchport access vlan 333

Additional matching regexes for
How do I write a Regex to inspect Cisco Interfaces

How do I write a Regex to inspect Cisco Interfaces

I am asking for help in writing a regular expression to shorten this expression. I need the string below to search every interface within the range of 1 -24 to validate the configuration. If one interface does not have the required configuration then the expression fails. interface GigabitEthernet1/***1 thru 24***.\n(.\n). description ** Unused Port **.\n(.\n). switchport access vlan 333

price selector

Matches any of the prices in the text below: Im asking $15,500 OBO Im asking 15,400$ Im asking 15400$ Im asking $15400 Im asking 15 400$ Im asking $15 400 Im asking 15.400$ Im asking $15.400 Im asking $ 15,400 Im asking 15,400 $ Im asking 15.400 $ Im asking $ 15.400

Cisco FastEthernet Ports 13-24

This regex captures Cisco-style FastEthernet ports 13-24

Access Log

cisco

Cisco FastEthernet Ports 1-12

This regex will grab all Cisco-style FastEthernet ports from 1 to 12

Conventional Commits validation

This regex prevents the writing of non-standard conventional commits. I'm available on my [github](https://github.com/chrisemke)

ReGEX EXPression

ReGEX EXPression generating Values but repeating want values should not repeat.

Match a specific CSV field.

Fields terminated by ';' even if the fields are surrounded by " does not accept newlines. Change the central qualifier to get the column. if you want the Xth field write X-1 and use the 3° mathing group OR write X and use the 2° match.

QBAR Atom Regex

Regular expression to match `atoms`. See [qbar.io/docs.html#expression-language-atom](https://qbar.io/docs.html#expression-language-atom) for more information.

Validate URLs

Someone on IRC posted the following site: https://mathiasbynens.be/demo/url-regex which challgenged me to write a decent regex to match valid URLs in that list. This regex works in both pcre and javascript (you'll have to replace the pcre-specific syntax to make it work in JS). Don't actually use this though, validate your URLs in a sane manner instead.