Re: Production 21 (and others)

Quoth Gavin:
>    "<!--*"([^*]|("*"[^-])|("*-"[^-])|("*--"[^>]))*"*-->" 

But I think there is a flaw, as this will not match
<!--**-*-->
as it's interpreted as folows:

>    "<!--*"([^*]|("*"[^-])|("*-"[^-])|("*--"[^>]))*"*-->" 
      A      B     C         D         E              F

<!--**-*-->
AAAAADDDBBB

This isn't actually a good thing to try to do with a regular expression.

For what it's worth, I tested this with perl (OK, so I'm dirty, but I'm
barefooted too, so that's OK):

perl -n -e 'if (/<!--\*([^*]|(\*[^-])|(\*-[^-])|(\*--[^>]))*\*-->/) { print; }'

Lee

Received on Wednesday, 29 January 1997 22:34:01 UTC