Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Regex match last

by BillKSmith (Priest)
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

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 surveying the Monastery: (3)
As of 2016-09-25 23:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (474 votes). Check out past polls.