https://github.com/md-command-line/personal_regex_quick_reference
https://github.com/md-command-line/personal_regex_quick_reference
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/md-command-line/personal_regex_quick_reference
- Owner: md-command-line
- Created: 2019-03-09T16:08:41.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-05-18T15:10:37.000Z (about 7 years ago)
- Last Synced: 2025-09-14T22:36:03.652Z (9 months ago)
- Size: 1000 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## personal_regex_quick_reference
Some rules that are helpful with regex:
```
^ - means enforce it matches the beginning.
$ - means enforce it matches the end.
? - means match characters excluding escaped characters and line breaks.
. - means matches a single character escaped characters and line breaks.
```
All of this information can be learned by looking at the regexr site.
My current process for resolving regular expresions: https://regexr.com/
```
Find all instances of class="" or class='' in an html file.
class=(["'])(?:(?=(\\?))\2.)*?\1
condensed further:
class=(["'])(?:(?=(\\?)).)*?\1
Find all instances of () with or without values inside.
/(\(([^)]+)\)|\(\))()/g
/[\(\)]/g
```
This is a personal reference as I use them I will list further commands.