简体   繁体   中英

Regular expression replace using Sublime Text 3

I have several comments in my javascript file that use the // syntax. I want to change it to /* */ syntax.

So, if I have a comment like:

// This is a comment , I want it changed to

/* This is a comment */

So far, I am able to select all the comments using the regex //.* , but am unable to do a proper replace. Any help ?

Replace

//([^\r\n]+)

By

/*$1 */

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM