Find and replace opening and closing HTML tag with specific class using Regex

Here is working example:

First group is > (<div.*.panel-default\"\>)

second > (.*)

third closing tag > (<\/div>)

and you substitute second group > <x-panel>$2</x-panel>

enter image description here

I don’t have phpstorm but also note that you have to enable global, multiline, insensitive case and don’t match new line to have it like this working in your editor I think

Leave a Comment