Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Help for regex

by FloydATC (Deacon)
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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2017-06-24 22:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (562 votes). Check out past polls.