Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi monks,
I have a really quick question... I'm a Perl newbie... just started a couple days ago: :-
Here is my question:
How would I remove all comment strings (double slashes and comment text) in an arbitrary javascript function similar to the below comment without removing things like http://... strings?
// comment string
I know it would be something like $fileString=~s/ not sure what the pattern replace would be after the s/
Thanks very much for any assistance you may provide.
John
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Removing javascript comments
by Joost (Canon) on Apr 09, 2008 at 22:30 UTC | |
Re: Removing javascript comments
by renodino (Curate) on Apr 09, 2008 at 23:39 UTC | |
Re: Removing javascript comments
by tachyon-II (Chaplain) on Apr 10, 2008 at 03:53 UTC | |
by Anonymous Monk on Apr 10, 2008 at 05:02 UTC | |
by Anonymous Monk on Jan 07, 2013 at 19:30 UTC | |
Re: Removing javascript comments
by deibyz (Hermit) on Apr 10, 2008 at 08:19 UTC | |
Re: Removing javascript comments
by cparker (Initiate) on Apr 11, 2008 at 19:29 UTC |
Back to
Seekers of Perl Wisdom