After reading the grammar once, practice on the site below and it’s done. It’s not as difficult as we think.
RegExr is an online tool to learn, build, & test Regular Expressions
RegexOne : Learn Regular Expressions with simple, interactive exercises.
한국어 무료 코스인데 꽤 괜찮다. https://programmers.co.kr
Groups and ranges
Character | Meaning |
---|
| | or |
() | group |
[] | charset, any character in parentheses |
[^] | negative character set, when it is not any statement in parentheses |
(?:) | find but don’t remember |
Quantifiers
Character | Meaning |
---|
? | zero or one |
* | zero or more |
+ | one or more |
{n} | repeat n times |
{min,} | min |
{min,max} | min, and max |
Boundary-type
Character | Meaning |
---|
\b | word boundary |
\B | not a word boundary |
^ | start of sentence |
$ | end of sentence |
Character classes
Character | Meaning |
---|
\ | non-special character |
. | any character (except newline characters) |
\d | digit |
\D | not a digit |
\w | word |
\W | not a word |
\s | space |
\S | not a space |
https://github.com/dream-ellie