Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^4: Help please

by davidrw (Prior)
on Apr 26, 2008 at 03:46 UTC ( #683023=note: print w/ replies, xml ) Need Help??


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.

/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, $/;


Comment on Re^4: Help please
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://683023]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2015-07-04 21:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls