Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Help for regex

by FloydATC (Hermit)
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


Comment on Re: Help for regex
Download Code

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 chanting in the Monastery: (6)
As of 2014-08-28 03:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (255 votes), past polls