Posts

Showing posts from December, 2017

Regex to find the parameters

[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)

Regex to capture comments

/\/\*[\s\S]*?\*\/|([^:"'=]|^)\/\/.*$/mg https://regexr.com/3hutg /*This one comment*/ //This is also comment /* comment with some space */ Some code//comment in the end //comment1 //comment2 /** /*Multi line /*Another */ /* Another style of comment */