Skip to content

Commit

Permalink
Make negated class explanation clearer
Browse files Browse the repository at this point in the history
Some readers were—understandably—confused by the use of x, y, and z as
variables
  • Loading branch information
shreyasminocha committed May 2, 2020
1 parent 8e1e7ef commit 1765b01
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions chapters/character-classes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,7 @@ We can also "negate" these rules:

The only difference between the first regex of this chapter and `/[^aeiou]/g` is the `^` immediately after the opening bracket. Its purpose is to negate the rules defined within the brackets. We are now saying:

> "match any character that is _not_ any of `x`, `y` and `z`"
Here, `x`, `y`, and `z` are either individual characters, ranges, or a combination of the two.
> "match any character that is _not_ any of `a`, `e`, `i`, `o`, and `u`"
## Examples

Expand Down

1 comment on commit 1765b01

@vercel
Copy link

@vercel vercel bot commented on 1765b01 May 2, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please # to comment.