Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

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;


Comment on Re: Golf: Fix de facto HTML comments
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (15)
As of 2015-07-06 17:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (77 votes), past polls