In the last lesson you learned about group references.
(Apples|Oranges) \1
matches “Apples Apples” and “Oranges Oranges”
But what if you use many groups where most of them you don’t need to reference?
That’s where non-capturing groups come in handy.
(?:) creates a non-capturing group.
(?:Apples|Oranges) \1
will not match “Apples Apples” or “Oranges Oranges”
It’s like the group doesn’t exist
Match the first two sentences