Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Regex Question

by HamNRye (Monk)
on Mar 26, 2009 at 17:06 UTC ( [id://753458]=note: print w/replies, xml ) Need Help??


in reply to Regex Question

Ahhh, never mind. I have it now.

$text =~ s/\x90[^\w]*<\/bugbreak[^>]*>.*?\x9D.*?\x9D(.*?)\x90/translat +eString($1)/esig sub translateString { my $text = shift; $text =~ s/<[^>]*>//g; }

This way, even if the match does slurp up too much, the formatting tags are removed and the "clean" string is returned for the substitution. Schweet.

Just typing the problem out made me think about it again and come up with a solution. Thanks.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2024-04-20 11:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found