Simple regex: turn $text$ to (text) in Sublime Text

In my work I have a very repetitive task, and I would believe that regex is a fast solution for it, though, my knowledge of regex is very sparse.

What I want to do is to in a txt-file find all occurences of

$text$

and replace them with

( text )

where text is LaTeX-code, so it can contain alphanumeric as well as other characters.

I plan to do this in Sublime Text, as it has a built in and convenient regex engine. Can anyone help?


Source: regex

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.