PDA

View Full Version : JavaScript Wild Card?


NymRod
04-20-2003, 10:02 PM
What's the wild card for JavaScript?

If I wanted to strip comment tags from a file how would I strip everything between <! and > ?

Would there be a problem with the hide tags that dont end on the same line as they started on?

Could it be done so it wouldn't strip the JavaScript hide tags too?


NymRod

Jon Hanlon
04-21-2003, 07:27 PM
Use a regular expression.
http://developer.netscape.com/docs/manuals/communicator/jsref/corea3.htm
http://www.devguru.com/Technologies/ecmascript/quickref/regexp.html
http://msdn.microsoft.com/library/en-us/script56/html/js56jsobjregexp.asp?frame=true

Note that Javascript doesn't have any file handling capacity.