How to Count number of lines of javascript in php files? -
I need to calculate the numbers Lines of inline javascript between script tags in php files How do I do this? Is the grep linux command sufficient or can I get some tools to do it? help please.
You can use regular expressions such as to extract the contents of each SCRIPT tag in your files And compared to calculating \ n events within the content.
This should match all the script tags, including regex opening and closing tags:
/ < Script [^ & gt; ] *? & Gt; (. *)? & Lt; / Script & gt; / Sm>
To count the actual rows of the JavaScript code, you must remove the tags and lines without any code.
Comments
Post a Comment