# What is Regular Expression?

## 1. Basic Rule of Patterns

`.....      // => Hello Regular expression`

## 2. Special Characters ^ \$ [ ] and Quantifier Pattern { }

`^HELLO     // => HELLO Regular expression HELLOHELLO\$     // => HELLO Regular expression HELLO`
`[EsR]       // => HELLO Regular expression HELLO[eE].       // => HELLO Regular expression HELLO[e-s]       // => HELLO Regular expression HELLO[a-eA-E4-6] // => HELLO Regular expression HELLO 123456[^ELest4-6] // => HELLO Regular expression HELLO 123456[^1-3].     // => HELLO Regular expression HELLO 123456`
`.{5}        // => Hello Regular expression[ELs]{1,3}  // => HELLO Regular expressssion HELLO[Ll}{2,}    // => HELLO Regular expression HELLO`

## 3. Quantifier Patterns * + ?

`A*B        // => BC ABC AABCA+B        // => BC ABC AABCA?B        // => BC ABC AABC.\*        // => -@- *** @@ *** -@- @+.        // => -@- *** @@ *** -@--?@@?-     // => -@- *** -@@- *-@@@- @A*@       // => -@- *** @@ *** -@--@+-       // => -@- *** -- *** -@-[-@]*      // => -@- *** @@ *** -@-[^ ]+      // => -@- *** @@ *** -@-`
`L.*        // => HELLO Regular expressssion HELLOL.*?       // => HELLO Regular expressssion HELLOL.+        // => HELLO Regular expressssion HELLO L.+?       // => HELLO Regular expressssion HELLO L.?        // => HELLO Regular expressssion HELLO [Ll].??    // => HELLO Regular expressssion HELLO`

## 4. Sub Patterns ( | ?= ?! )

`(on|ues|ednes)   // => Monday Tuesday Wednesday..(n|es|dnes)day  // => Monday Tuesday Wednesday`

## 5. Built-in Regular Expression Patterns

`\b.     // => HELLO Regular expressssion\B.     // => HELLO Regular expressssion .\b     // => HELLO Regular expressssion .\B     // => HELLO Regular expressssion `
`\A..     // => HELLO Regular expressssion\Z..     // => HELLO Regular expressssion`

## 6. Assertion Patterns

`\w+(?=O)   // => HELLO Regular expressssion\w+        // => HELLO Regular expressssion\w+(?=\w)  // => HELLO Regular expressssion`
`AAA(?!X)   // => AAAX---AAA`

Software Engineer Student

## More from Esther Kim

Software Engineer Student