I need a regex to strip single line comments from a string, but leaves URLs untouched. Code should be working with something like this:
//Some Comment on http://bobobo.com where bla < 5
<script type="text/javascript" src="http://bububu.com"></script>
<script type='text/javascript' src='http://bababa.com'></script>
EDIT: of course I do not use that kind of comment in the HTML file. Correct example would be
<script type="text/javascript">
//Some Comment on http://bobobo.com where bla < 5
</script>
<script type="text/javascript" src="http://bububu.com"></script>
<script type='text/javascript' src='http://bababa.com'></script>
My bad, sorry for the mislead.
A possible solution should find "//Some Comment on http://bobobo.com where bla < 5", but not "//bububu.com">" and "//bababa.com'>".
Thanks for any hint...