in reply to Re^3: Help please
in thread Help please
Here's two different ways:
One way is that you could capture the character class match with parens, and then refer to it (in this case) as $2.
Another way would be to simply move the character class to be inside the existing capturing parens:
One way is that you could capture the character class match with parens, and then refer to it (in this case) as $2.
/it (.*)([.?,])$/i and print $1, $2, $/;
Another way would be to simply move the character class to be inside the existing capturing parens:
/it (.*[.?,])$/i and print $1, $/;
In Section
Seekers of Perl Wisdom