Way to do do search/replace adding linebreaks?

Is there a way to use the RubyMine editor to replace all commas with actual line breaks?

3 comments
Comment actions Permalink

Hi Chez,

Try this (as far as I understood your request):

  1. Bring replace dialog (for current file (Ctrl+R) or multiple files (Ctrl+Shift+R))
  2. Check that Regex (Regular expression) box is ticked
  3. Type search pattern in "Find" filed (in your case it should be just comma , )
  4. Type replacement pattern: for line break it will be \n
  5. Hit "Replace" or "Replace All"

3
Comment actions Permalink

Yup, that did it. Thank you.

0
Comment actions Permalink

That's not a great solution when the search string is complicated and has lots of things that would be interpreted as part of a regular expression.

-1

Please sign in to leave a comment.