Replace string with newline PHPStorm
You have to check "Regex" and replace whatever you like with \n
.
- Search for:
,
- Replace by:
=>"iiii",\n
- DO NOT FORGET to check
Regex
option (as shown on 1st screenshot below) - Hit "Replace all" button
BEFORE:
AFTER:
Update for anyone else, you can just click the highlighted enter
icon below to do new line in search and replace;
EDIT
Checkout @fromvega's answer if you have PhpStorm 2019, it is much more straightforwarrd. If your version is older, though, keep reading.
There is a way.
When you hit Ctrl-R to do a replace, click the Multiline icon (see the little white icon on the screenshot). You'll see two larger textboxes appear:
Just put a newline in the second box.