Regular Expressions Find and Replace

by Dan

2009-07-22_085637Dealing with databases and SQL I run across a lot of lists that are usually broken by either excel or line breaks.  Well when you need a quick way to convert that to a single line comma separated list the fastest way to do it is a find and replace on regular expressions.  This can be easily done with Notepad++ or just about any text editor

For example if you had a list like:

1
2
3
4

A find of \r\n and replace with , will give you the output of

1,2,3,4

This can save a whole bunch of time!

Related posts:

  1. MySQL – Find and Replace Statement The other day I had to move a blog...
  2. Change Firefox’s Default Source Editor Well since I am a little partial to using...
  3. Font Tester – See the Difference This is probably one of the biggest things that...

Related posts brought to you by Yet Another Related Posts Plugin.

Comments are closed.