Install through VS Code extensions. Search for RegEx Share
Can also be installed in VS Code: Launch VS Code Quick Open (CMD/CTRL + P), paste the following command, and press enter.
ext install lndgalante0765.regex-share
✅ Visualize your RegEx online in RegExr
✅ Generates example strings that matches your Regex
- Select your RegEx
- Press CMD/CTRL + Shift + R
- Or using Command Palette (CMD/CTRL + Shift + P) -> Share your RegEx
Max number of examples that matches the RegEx
RegExr currently supports JavaScript RegExp executed in your browser and PCRE via PHP. Valid options:
- "js" - Your browser's JavaScript engine is used to execute RegEx in an asynchronous worker using RegExp.exec()
- "pcre" - PHP 7.0.6 and PCRE 8.38 2015-11-23 are used to execute your pattern on our server
Tools provide different ways of working with or exploring your results. Valid options:
-
"replace" - The Replace tool replaces matches with a specified string or pattern.
-
"list" - The List tool lists all found matches.
-
"details" - The Details tool displays the full text of a match and its capture groups.
-
"explain" - The Explain tool displays a detailed breakdown of the Expression.
- Shorcut to share the Regex i.e CMD + Shift + R
- Configure how many example strings i.e "regexShare.maxCases": 10. By default is set to 12.
- Configure what Regexr
tool
to use i.e "regexShare.tool": "explain". The tools are: replace, list, details, or explain (default).
- Configure what Regexr
engine
to use i.e "regexShare.engine": "js". The engines are: pcre or js (default).
Feel free to open issues or PRs!
MIT © Leonardo Galante