regex - Using regular expressions to locate line comments without spaces -


i tried find comments beginning // don't have space after slashes.
want select only slashes. no whitespace or text before that, no whitespace or text after that.
far i've reached [\s].(\/\/(?! )) catches space before slashes well.

basically wanna make sure line comments have space after slashes. i'm trying either in javascript or in text editor.

since javascript doesn't have lookbehind feature, can't.

the workaround (for instance, in replacement context) use capture group character before 2 slashes , start replacement string reference group ('$1replacement'):

([^/\s]|^)//(?! ) 

Comments

Popular posts from this blog

AbotX : How do you create a parallel crawler that stays on and can be added to at run time from new requests -

testing - Detect whether test has failed within fixture -

android - Create single AAR file from multiple modules using Gradle -