IntelliJ IDEA
 
Get IntelliJ IDEA
You are viewing the documentation for an earlier version of IntelliJ IDEA.

Structural search and replace examples

Last modified: 10 August 2022

As you know the main difference between regular search and the structural search is that in the structural search we are looking for a structural template in a programming language.

The beauty of a structural search is that you can create a pattern based on the existing template and save yourself time when searching and replacing code.

The extensive list of existing templates covers a lot of use-cases from simple patterns to more complex ones.

Each item in a pattern consists of variables that are limited by $ sign on both sides.