Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sublime Text2 how to replace with parameter?

I have a text like: "test 1 test 2 test 3" and i want to replace to something like: "test d1 test d2 test d3", for this i think that i can use a regex: "\d" and then in the replace use "d(parameter)" so i can catch the number 1, 2 and 3. it is possible in sublime text 2 like is in notepad++ or editplus?

like image 278
tiagomac Avatar asked Dec 10 '25 13:12

tiagomac


1 Answers

In Ctrl + H (Replace...) you should enable Regular expression (Alt+R) and then you should use

\d+

in Find What and

d$0

in Replace With

like image 59
sebast26 Avatar answered Dec 13 '25 15:12

sebast26