Perl provides an alternative (?:. . . ) form of parentheses that supports grouping in regular expressions

Question:

Perl provides an alternative (?:. . . ) form of parentheses that supports grouping in regular expressions without performing capture. Using this syntax, Example 14.57 could have been written as follows:

if (/^([+-]?) ((\d+)\.I(\d*)\. (\d+))(?:e([+-]?\d+))?$/) { # floating-point number print What purpose does this extra notation serve? Why might the code here be preferable to that of Example 14.57?

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: