Search and replace inserting character

I have a project with PhpStorm and I need to find and replace all instances of @include('[not a forward slash] and add a forward slash (/) after the single quote.

For example: find all @include('a and replace with @include('/a. Only I would prefer not to do this 26 times for each letter of the alphabet.

How would I do this with PhpStorm?

I can find in path using regex @include\('\w, but there are hundreds and it is very slow doing this manually.

1 answer

  • answered 2019-03-14 08:54 Ástþór

    In latest PhpStorm use Replace in Path (ctrl+shift+r):

    • regex pattern to find: @include\(\'(?!/)

    • regex pattern to replace: @include\(\'\/