Home / CSE / Javascript - CS :: Discussion

Discussion :: Javascript - CS

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

  2. 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

    View Answer

    Workspace

    Answer : Option B

    Explanation :

    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.


Be The First To Comment