What is the most essential purpose of parantheses in regular expressions ?

A Define pattern matching techniques
B Define subpatterns within the complete pattern
C Define portion of strings in the regular expression
D All of the mentioned

Correct Answer: Define subpatterns within the complete pattern

When a regular expression is successfullyy matched against a target string, it is possible to extract the portions of the target string that matched any particular paranthesized subpattern. The essential purpose of parantheses in regular expressions is to define subpatterns within the complete pattern.

Related Questions

The class that represents the regular expressions is
What is the essential purpose of Life Insurance?

Next steps