Sublime Forum

Multiple find and replace with Regular Expression

#1

Hi guys,
first of all I’m sorry about my bad English: I hope you can understand my question.

In Fantastic Sublime Text 2 I would like use regular expression to find and replace in the same time two different groups. Now I explain:

if I have different row similar to:

[code]

[/code]

I would like substitute “path_pictures(” with “$this->path.” and the first closure bracket after the png with “;”. That is to obtain following result:

[code]

[/code]

Is it possible?
I have no practice with RegEx, so it’s very difficult for me…

Thanks!

0 Likes

#2

This should do the trick.

Find: path_pictures\('(.+)'\)
Replace With: $this->path.'$1';

0 Likes

#3

yes works!

Thank you so much!

0 Likes