Skip to content

Commit

Permalink
Simplify Character Classes examples
Browse files Browse the repository at this point in the history
Addresses #13
  • Loading branch information
shreyasminocha committed May 2, 2020
1 parent 1765b01 commit 380321e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions chapters/character-classes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -72,18 +72,18 @@ The only difference between the first regex of this chapter and `/[^aeiou]/g` is
## Examples

### Username validation
### Invalid username characters

<Example regex={/^[a-zA-Z_0-9-]+$/g}>
<Example regex={/[^a-zA-Z_0-9-]/g}>
<li>TheLegend27</li>
<li>WaterGuy12</li>
<li>Smokie_Bear</li>
<li>Robert'); DROP TABLE Students;--</li>
</Example>

### Ambiguous characters
### Unambiguous characters

<Example regex={/[^A-HJ-NP-Za-kmnp-z2-9]/g}>
<Example regex={/[A-HJ-NP-Za-kmnp-z2-9]/g}>
<li>foo</li>
<li>lily</li>
<li>lI0O1</li>
Expand Down

0 comments on commit 380321e

Please # to comment.