Am Donnerstag, 24. Oktober 2013 16:08:42 UTC+2 schrieb Jeremy Ruston:
>
> I'm not sure whether the changes you're proposing are safe.
>
> I thought I already closed the page but just found it to still be open.

Here is my test HTML/JavaScript:

<!DOCTYPE html>
<html>
<body>
<textarea id="str">pre <!-- 
line1 
line2 
-
- -
comment --> <!-- --> post
</textarea>
<p>Click the button</p>

<button onclick="myFunction()">Try it</button>

<textarea  id="demo"></textarea>
<script>
function myFunction()
{
var str = document.getElementById("str").value;
var patt1 = /<!\s*--(?:[^-]|-[^-])*--\s*>/g;
var result = str.match(patt1);
document.getElementById("demo").value=result.join("\n------\n");
}
</script>

</body>
</html>
 
I've tested it on 
http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_regexp_m

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywikidev.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to