Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: regex help

by JediWizard (Deacon)
on Jun 27, 2005 at 01:44 UTC ( [id://470129]=note: print w/replies, xml ) Need Help??


in reply to regex help

Any reason you are opposed to two lines?

($result = $htmlline) =~ s/<tag marker>(.+?)</td>/$1/; $result =~ s/<br(?:\s\/)?>/\n/g;

Update: If you really want one line: (untested)

( $result = $htmlline ) =~ s/{<tag marker>(.+?)</td>}{join("\n", split +(/<br(?:\s/?)?>/, $1))}eg;

They say that time changes things, but you actually have to change them yourself.

—Andy Warhol

Log In?
Username:
Password:

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

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

    No recent polls found