The x Modifier: The Expressive Modifier : modifier « Regular Expression « Perl
- Perl
- Regular Expression
- modifier
The x Modifier: The Expressive Modifier
#The x modifier allows you to place comments within the regular expression
$_="A to B\n";
/A # Searching for A /x;
print "Comments and spaces were removed and \$& is $&\n";
Related examples in the same category