Learn Before
Concept

Parenthesis (grouping) operator ()

Enclosing patterns in parentheses makes the whole search pattern remains one string, while disjunction operator | can be placed within, to specify the variations of the search pattern. E.g. /gupp(y|ies)/ -> matches either the string guppy or guppies.

0

1

Updated 2021-09-12

Tags

Regular Expression

Data Science