Find and replace regex in Visual Studio Code does not work as expected

Viewed 16

I have pieces of code that look like this:

"assets/images/imagename.png" (different names of images)

which I wish to replace this in Visual Studio Code

I already have the correct expression to find/search the items:

"assets/images/(.+?)" 

and then all the correct strings are selected for replacement.

but when I try to replace with:

<?php echo get_theme_file_uri('/images/(.+?)');?>

It litteraly replaces with this exact string, not the name of the image. I have been experimenting, but I can't find the solution?

0 Answers
Related