Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: keeping one pattern but removing all else from a string

by Cody Pendant (Prior)
on Jul 13, 2002 at 04:07 UTC ( [id://181452]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $html =~ s/<($tag[^>]*?)>/{{{$1}}}/sgi;# temp-encode starting tags
    $html =~ s/<\/($tag[^>]*?)>/{{{\/$1}}}/sgi; # temp-encode ending tags
    $html =~ s/<[^>]*?>//sgi;# kill all remaining tags
    $html =~ s/\{{3}/</sgi;# re-encode '<' tags
    $html =~ s/\}{3}/>/sgi;# re-encode '>'tags
    
  2. or download this
    ($_='jjjuuusssttt annootthheer
         pppeeerrrlll haaaccckkeer')=~y/a-z//s;print;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2024-04-19 17:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found