IDEA have function for find and replace text in file (Ctrl + R) and supports regular expressions.
For example I write replace 1 to 2 and after this I need do i