Вопрос

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?

Это было полезно?

Решение

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.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top