March 8, 2007
Using Grep Is a Huge Time Saver
There are certain repetitive tasks I do throughout the day. And with those tasks, I try to automate as much as possible. Why? Because a few minutes saved several times per day, seriously adds up.
One thing I do is use my toolbar bookmarks folder to store articles, blog entries and other items that I want to write or link to throughout the day.
I then export that folder into Text Edit. After that, I save the files as HTML.
I then bring it into BBEdit so I can use the power of find and replace with grep.
For example, with my daily link finds, I need to format the links so that we have the article name as a hyper link followed by a comma and then the article source.
So with a bit of grep, I am able to do a find and replace on the HTML generated by Text Edit and make my HTML in a matter of a split second versus a few minutes. I use this several times a day for several different reasons, so it is a huge time saver. Thank you Ronnie.
Here is a screen capture of the BBEdit grep action in use:
Basically, it is:
Find this: ^<p class="p1">(.+),([^,]+)</a></p>$
Replace with: <li>\1</a>, \2</li>


