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.
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.
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:
You can also open it with the shortcut Ctrl+Alt+/ (default).
Note that even ^
and $
are already supported by Atom's find-and-replace.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With