Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Regex match last

by BillKSmith (Chaplain)
on Aug 20, 2012 at 13:08 UTC ( #988447=note: print w/ replies, xml ) Need Help??


in reply to Regex match last

Your regex does match your sample string! (But not in the way you want.) A very good reason to use a module.

A Simple fix is:

use strict; use warnings; use English; my $html = '<c:t="AD2343"/><c:p>65677676</c:p>'; $html =~ m{<c:.*/>}; print $MATCH, "\n";
Bill


Comment on Re: Regex match last
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (7)
As of 2014-12-26 20:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (176 votes), past polls