Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Search and Replace with RegEx components in Atom editor

People also ask

Does Atom support regex?

This takes advantage of a built in regex feature in the Atom text editor. It may work in other text editors as well, so give it a try in your favorite text editor or IDE.

Can you replace with regex?

How to use RegEx with . replace in JavaScript. To use RegEx, the first argument of replace will be replaced with regex syntax, for example /regex/ . This syntax serves as a pattern where any parts of the string that match it will be replaced with the new substring.

How do I open an Atom in regex?

You can also open it with the shortcut Ctrl + Alt + / (default).


If you Cmd-F and open the search pane, there is a ".*" button at the right side. Click it and now it's regex mode.

I find

(http.*)\{\.uri\}

and replace to

[$1]($1)

Juste to update @speedogoo's answer for future readers, if you do not find the regex mode in the search view, it looks like this:

enter image description here

You can also open it with the shortcut Ctrl+Alt+/ (default).


Note that even ^ and $ are already supported by Atom's find-and-replace.