Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^4: Regular expression

by sandy1028 (Sexton)
on Jun 08, 2009 at 04:38 UTC ( [id://769377]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Regular expression
in thread Regular expression

my $line = "<ci:Name> Lord: Of The $10Ring$s </ci:Name>"; my $words = ''; if ($line =~ m/<.*>(.*)<\/.*>/) { $words = $1; } print $words;
How to match all the text outside the angle brackets. Here $10 and $s is not displayed on print. From the text "Lord: Of The $10Ring$s" I have to delete ':' and "$". Please help me to proceed. Thanks

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (5)
As of 2024-04-24 18:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found