You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The regex in this example (/James|james Gray|gray/) will match any string containing "James", or "james Gray", or "gray", which is probably not what you intended. That is,
Chapter 4 / Regular Expressions / Don't Work Too Hard introduces the section with the following code:
The regex in this example (
/James|james Gray|gray/
) will match any string containing "James", or "james Gray", or "gray", which is probably not what you intended. That is,Suggest either
/(James|james) (Gray|gray)/
or/(?:James|james) (?:Gray|gray)
, or note that finding the bug is an exercise for the reader.The text was updated successfully, but these errors were encountered: