kepler has asked for the wisdom of the Perl Monks concerning the following question:
Greetings
I found in Perl Monks a very good node about this subject, at https://www.perlmonks.org/?node_id=117150
It works very well, with the exception of the removing of comments, that accidently also cuts/removes urls of the form 'http://etc...' that are processed just to 'http'. The other problem I partially fixed, is the case of, for example, an array that is placed in the code in multiline, ending this way (the first lines) in a comma. The script assumes that the lines must terminate only in ';', '{' or '}'. Either way, can someone help me regarding the regex for the removal of comments without removing urls?
I would apreciate it very much.
Thanks, Kepler
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Compressing/obfuscating Javascript
by marto (Cardinal) on Sep 18, 2020 at 18:45 UTC | |
|
Re: Compressing/obfuscating Javascript
by hippo (Archbishop) on Sep 18, 2020 at 19:21 UTC | |
|
Re: Compressing/obfuscating Javascript
by karlgoethebier (Abbot) on Sep 19, 2020 at 16:13 UTC | |
|
Re: Compressing/obfuscating Javascript
by perlfan (Parson) on Sep 20, 2020 at 04:24 UTC | |
|
Re: Compressing/obfuscating Javascript
by Anonymous Monk on Sep 18, 2020 at 18:30 UTC |