Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Re: Golf: Fix de facto HTML comments

by bageler (Hermit)
on Jul 19, 2004 at 02:12 UTC ( #375448=note: print w/replies, xml ) Need Help??

in reply to Golf: Fix de facto HTML comments

here's 56. I used a period since the other char acted funky in my editor.

edit: trimmed two chars, removed unneccessary character replacements.
#2345678 1 2345678 2 2345678 3 2345678 4 2345678 5 23456 s/<!--(.*?)-->/(my$x=$1)=~s!-(-?)!$1.!g;"<!--$x-->"/egs;

two chars less, 54:
#2345678 1 2345678 2 2345678 3 2345678 4 2345678 5 23456 s/<!--(.*?)-->/($_=$1)=~s!-(-?)!$1.!g;"<!--$_-->"/egs;

makes less changes, but adds to 55:
#2345678 1 2345678 2 2345678 3 2345678 4 2345678 5 23456 s/<!--(.*?)-->/($_=$1)=~s!-(-+?)!$1.!g;"<!--$_-->"/egs;

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://375448]
marioroy just logged in to say that MCE::Hobo has passed testing and therefore will continue to run like threads but have managed capabilities similar to Parallel:: ForkManager. It allows multiple managed instances to run simultaneously. Zero limitations.
marioroy it's taken a long time to make this possible.
marioroy will post demonstrations after release

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (8)
As of 2017-07-28 19:45 GMT
Find Nodes?
    Voting Booth?
    I came, I saw, I ...

    Results (433 votes). Check out past polls.