Skip to content

Commit

Permalink
Replace × with = in Groups example
Browse files Browse the repository at this point in the history
Resolves #24
  • Loading branch information
shreyasminocha committed May 9, 2020
1 parent c2d2364 commit d6e0195
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions chapters/groups.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ Backreferences allow referring to _previously captured substrings_.

The match from the first group would be `\1`, that from the second would be `\2`, and so on…

<Example regex={/([abc])×\1×\1/g}>
<li>a×a×a</li>
<li>ab×b×b</li>
<li>a×b×c</li>
<Example regex={/([abc])=\1=\1/g}>
<li>a=a=a</li>
<li>ab=b=b</li>
<li>a=b=c</li>
</Example>

Backreferences _cannot_ be used to reduce duplication in regexes. They refer to _the match_ of groups, not the pattern.
Expand Down

1 comment on commit d6e0195

@vercel
Copy link

@vercel vercel bot commented on d6e0195 May 9, 2020

Choose a reason for hiding this comment

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

Please # to comment.