Search and Replace with RegEx components in Atom editor

wintermeyer picture wintermeyer · Mar 6, 2014 · Viewed 93.4k times · Source

I want to search and replace this

`https://example.com/`{.uri}

to

[https://example.com/](https://example.com/)

With vim I would do a s/(http.*){.uri}/[\1](\1)/g but that doesn't work with atom.io. How can I solve this?

Answer

speedogoo picture speedogoo · Mar 13, 2014

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)