For those of you familiar with regular expressions, you’re going to love this little feature in Notepad++, Regex find and replace. If you haven’t used it yet, you’ve been wasting your time doing things the hard way.

Lets say I have a text file with a List of websites in the format as such: URL, Description, Name and I want to turn this list into a bunch of links.

regex-1.png

I would look for the following string:

(http://[a-z.]+), ([A-z ']+), ([A-z ]+)

By using parenthesis, I’m defining variables I’d like to call back in my replace string. I have created three, the URL(\1), the Descriptiption(\2) and the Name(\3). Then I call them in my replace string and rearrange them as such:

<a href="\1">\3</a>: \2

regex-2.png

Now I just click replace, and like magic they are all transformed into pastable links:

regex-3.png

Do Know Evil: Tyler Mulligan’s Blog
detrition: Tyler Mulligan’s Portfolio
Google: Tyler’s Search Engine of Choice

But the fun doesn’t stop there, no no no. Say I had multiple files with the same structure, I would just open said files and click, “Replace in all open documents”.

regex-4.png

So there you have your crash course in regex find and replace compliments of Notepad++. It’s it bit limited in some respects, it doesn’t fully support regular expressions but it certainly makes a difference. You can read the details about it’s abilities here.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Netvouz
  • DZone
  • ThisNext
  • MisterWong
  • Wists
  • blogmarks
  • BlogMemes
  • Furl
  • NewsVine
  • Reddit
  • SphereIt
  • Spurl
  • StumbleUpon
  • Technorati
  • YahooMyWeb