Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Help for regex

by FloydATC (Chaplain)
on Apr 01, 2012 at 18:41 UTC ( #962906=note: print w/replies, xml ) Need Help??


in reply to Help for regex

If all you really want to do is remove the tags, this should be enough:
my $string = "-<ID>A8W11200031</ID>"; $string =~ s/<.+?>//g; print $string . "\n";
Ofcourse, if your actual input contains other tags than what your sample input shows, you'll get funny results.

-- Time flies when you don't know what you're doing

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2016-09-26 03:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (475 votes). Check out past polls.