[Jax.PM] Wake up =)

Aaron Johnson solution at gina.net
Sun Aug 31 20:43:05 CDT 2003


On Sun, 2003-08-31 at 20:32, iudicium ferat wrote:
> [a jax.PM member posting]
> > What is wrong with this code?
> > > 
> > > s{ <!(.*?)(--.*?--\s*)+(.*?)> }{ if ($1 || $3) "<!$1 $3>"; } }gesx;
> > > 
> > 
> > It appears that you are attempting to remove HTML comments.
> > One problem I see is that it isn't striping the <! and > from the HTML.
> 
> Nope, when used as part of the original code, it hangs on the HTML test case...
> 

Quite right, not sure what I was thinking.

> > > 
> > > BONUS:
> > > Where did I steal it from?
> > > 
> > 
> > TPJ Issue 1?
> 
> 
> Great guess  :)  But actually this code came from Tom Christenens site at
> 
> http://www.perl.com/CPAN/authors/Tom_Christiansen/scripts/
> 

It does appear in TPJ issue 1 as well however.

> 
> (And no, it isnt broken there - I removed a { prior to posting.)
> 
> Cheers!
> -Sx-
> 
> 
> _______________________________________________
> Jacksonville-pm mailing list
> Jacksonville-pm at mail.pm.org
> http://mail.pm.org/mailman/listinfo/jacksonville-pm




More information about the Jacksonville-pm mailing list