

In the search field, enter parentheses () that would indicate a capturing group, for example: '(+)detail'. [.įor example, for the numbered capturing groups, use the following syntax:įor the named capturing groups, use the following syntax: Find and replace a captured group However, when you specifically search for metacharacters such as. Keep in mind that if you copy ( Ctrl+C) the string first and then paste ( Ctrl+V) it in the search field, the regex symbols will not be taken into account. When you search for a text string that contains special regex symbols, WebStorm automatically escapes them with backlash \ in the search field. If you want to check the syntax of regular expressions, hover over and click the Show expressions help link. For more detailed information, refer to Search for a target within a project.Įnter a search string in the top field and a replace string in the bottom field.Ĭlick to enable regular expressions. If you need to search and replace in more than one file, press Ctrl+Shift+R. Press Ctrl+R to open the search and replace pane. Once you learn the regex syntax, you can use it for almost any language. They can help you in pattern matching, parsing, filtering of results, and so on.

When you want to search and replace specific patterns of text, use regular expressions. Find and replace text using regular expressions
