Open main menu
Save & Share
Published on Tue Mar 01 2022
Additional matching regexes for
CSS Coding Guideline **BEM** (Block Element Modifier)
Parse CISCO NEXUS 9xxx/5xxxx show inventory output w/o | json modifier
Parse CISCO NEXUS 9xxx/5xxxx show inventory output w/o | json modifier. Nexus 9xxxx don't have the json output modifier. It's a LINUX based os, so | json would fork a json binary which doesn't exist
URL Validator and Slicer
Validates a URL input as text and then slices it into: protocol, base_url, port, relative_url and parameters. (Multiline and global flags are set for debugging reasons only)
Match multiline comments /* ... */
It won't match single line comments like this one: //* This comment won't be match */ ^ see the double / Works in PHP without the g modifier.
printf conversion specification parsing
Parses `printf` conversion specifications. This version detects multiple flags and ` `(space) flag. MSVC length modifier `I64` is also supported. I'm using this regex in my Python project, so please change accordingly if you use other flavor of regex.
Convert camelCase to snake_case. In `Python` the `\L` case modifier in the substitution pattern to lower case is not supported. ```py def camelCase2snake_case(txt): """ Convert camelCase to snake_case https://regex101.com/r/D3a0de/2/ """ txt = re.sub(r'([A-Z]+)', '_\\1', txt.strip()) txt = txt.lower() return txt ``` [JV-conseil](https://github.com/JV-conseil)