Find and replace a string using regular expressions - kiril-dragomirov/PHPStorm GitHub Wiki
When you want to search and replace specific patterns of text, use regular expressions. They can help you in pattern matching, parsing, filtering of results, and so on. Once you learn the regex syntax, you can use it for almost any language.
-
Press Ctrl+R to open the search and replace pane.
-
Select the Regex checkbox to enable the regex syntax. If you need to check the regex syntax reference, click the question mark next to the Regex.
-
Enter a search string in the top field and a replace string in the bottom field.

- When you search for metacharacters such as .[{()^$|?*+, you need to escape them with backslash () so they can be recognized.
For example, if you need to find ., type . in the search field.
- If the Match Case checkbox is cleared, PhpStorm searches for both lower and upper cases. Select the Match Case checkbox to match the case of the specified range.
