Say I wanted to replace all commas with commas and a new line using Intellij IDEA\'s replace function. What do I put in the search box? In vim I\'d use &\\r
The is related but not exactly what you asked. But I needed it and I can imagine others do to. So I had the problem in Node.js where I wanted to split a reject into call into a log and reject for clarity
reject(error)
into
appLogger.log(error, 'error')
reject(error)
In normal mode, I did find and replace
Find:
reject(error)Replace:
appLogger.log(error, 'error')\n reject(error)
Then in regex mode I did a second find and replace:
Find:
\\nReplace
\n