We don't bite newbies here... much | |
PerlMonks |
Re: Compressing/Obfuscating a Javascript fileby tachyon (Chancellor) |
on Oct 06, 2001 at 07:54 UTC ( [id://117165]=note: print w/replies, xml ) | Need Help?? |
To do this properly is difficult. As a start you need to do somthing like this:
You need to remove all the comments first to ensure that the only occurences of the word function represent keywords. You can then just use split with a positive lookahead assertion in the regex to generate your array. The next step you want to do is much harder but that is another story. cheers tachyon s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
In Section
Seekers of Perl Wisdom
|
|