Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^3: Regex match last

by Neighbour (Friar)
on Aug 20, 2012 at 11:32 UTC ( #988431=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Regex match last
in thread Regex match last

In that case, you'll want:

#!/usr/bin/perl use strict; use warnings; my $data = '<w:body><w:p w:rsidR="00A654E7" w:rsidRPr="00AD741F" w:rsi +dRDefault="00A654E7" w:rsidP="00A654E7"><w:pPr><w:pStyle w:val="Stand +ard"/><w:rPr><w:rFonts w:asciiTheme="minorHAnsi" w:hAnsiTheme="minorH +Ansi" w:cstheme="minorHAnsi"/><w:sz w:val="20"/><w:szCs w:val="20"/>< +/w:rPr></w:pPr><w:r w:rsidRPr="00AD741F"/></w:body>'; print "Matches found:\n" . join (",\n", $data =~ m@(<[^>]*/>)@g) . "\n +";
Output:
Matches found: <w:pStyle w:val="Standard"/>, <w:rFonts w:asciiTheme="minorHAnsi" w:hAnsiTheme="minorHAnsi" w:csthem +e="minorHAnsi"/>, <w:sz w:val="20"/>, <w:szCs w:val="20"/>, <w:r w:rsidRPr="00AD741F"/>


Comment on Re^3: Regex match last
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (11)
As of 2014-08-20 13:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (113 votes), past polls