https://github.com/tahmid-tanzim/regular-expression
Learning Regular Expressions by Kevin Skoglund
https://github.com/tahmid-tanzim/regular-expression
pattern-matching regex regex-pattern regular-expression
Last synced: 5 months ago
JSON representation
Learning Regular Expressions by Kevin Skoglund
- Host: GitHub
- URL: https://github.com/tahmid-tanzim/regular-expression
- Owner: tahmid-tanzim
- Created: 2019-12-07T11:24:41.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-09-09T07:37:17.000Z (almost 5 years ago)
- Last Synced: 2025-02-13T08:39:05.782Z (over 1 year ago)
- Topics: pattern-matching, regex, regex-pattern, regular-expression
- Homepage: https://www.linkedin.com/learning/learning-regular-expressions-2
- Size: 33.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Regular Expression
### Online Regular Expression Engine
1. [https://regexr.com/](https://regexr.com/)
2. [https://regex101.com/](https://regex101.com/)
3. [https://www.regexpal.com/](https://www.regexpal.com/)
### Metacharacter
* Wildcard Metacharacter
* Escaping Metacharacter
* dot (\\.)
* forward slash (\\/)
* Special Characters
* Spaces
* Tabs (\t)
* Line Return (\r, \n, \r\n)
### Character Sets
* `\d` = [0-9]
* `\w` = [a-zA-Z0-9]
* `\D` = [^0-9]
* `\W` = [^a-zA-Z0-9]
* `\s` = [\r\n\t\f]
### Repetition Metacharacters
1. `*` Zero or more times
2. `+` One or more times
3. `?` Zero or one time
### Quantified Repetition
1. `\d{0,}` is same as `\d*`
2. `\d{1,}` is same as `\d+`
3. `\d{3}-\d{3}-\d{4}` matches most US phone numbers
4. `/^(\+88)?01[76598]\d{8}$/g` matches most Bangladeshi mobile phone numbers
### Greedy expression vs Lazy expression
* [https://javascript.info/regexp-greedy-and-lazy](https://javascript.info/regexp-greedy-and-lazy)
* [https://medium.com/@318097/greedy-lazy-match-in-regular-expression-35ce8eca4060](https://medium.com/@318097/greedy-lazy-match-in-regular-expression-35ce8eca4060)