in reply to Re: Help please
in thread Help please

Hmm.. does seem like homework as Grandfather suggested, so i won't post a regex, but instead these points for OP to consider (perldoc perlre) with regards to the above regex:

Replies are listed 'Best First'.
Re^3: Help please
by steveatmarz (Initiate) on Mar 11, 2008 at 19:50 UTC
    I have searched far and wide and I can't find how to accomplish the printing of the trailing char from character set .?,
      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.
      /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, $/;