From 1765b0118a03184db27cc2c4b782ec1b338617ef Mon Sep 17 00:00:00 2001 From: Shreyas Minocha Date: Sat, 2 May 2020 23:57:02 +0530 Subject: [PATCH] Make negated class explanation clearer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some readers were—understandably—confused by the use of x, y, and z as variables --- chapters/character-classes.mdx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/chapters/character-classes.mdx b/chapters/character-classes.mdx index 05078ee..3818873 100644 --- a/chapters/character-classes.mdx +++ b/chapters/character-classes.mdx @@ -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