user3720435
user3720435

Reputation: 1476

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.

Upvotes: 1

Views: 46

Answers (1)

Dmitrii
Dmitrii

Reputation: 3557

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

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

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

Upvotes: 2

Related Questions