Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
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