To clarify first, I already have a compression tool that successfully compresses EVERYTHING else so I don't need a long complicated preg_replace
regex, just a simple preg_replace
or str_replace
rule will do.
I ONLY want to remove JavaScript comments that start with "// " (including the space so I don't erase URLs) up until the new line. THAT'S IT! Once again, I don't need to replace /* */ or any other variations as I have a script that does that already; the only thing it's missing is this one feature so I want to clean up the input with this first, then hand it over to the script.
Here are screenshots with examples of comments I would like to remove:
I would really appreciate help with this! :-) THANKS!