Nerdy Tuesdays: GREP

by May 15, 2012Tech2 comments

So. I had a huge list of books that was to go up on a website I designed. The list included ISBNs, and I wanted to make every ISBN a link containing my Amazon affiliate code.

The list included the ISBNs in a convenient standard format: “ISBN 1234567890123.” All the entries looked something like this:

Dragonfly Books, 2008, c1996. LCCN 96012111. pbk., ISBN 9780375844515, $7.99. 1 vol. (unpaged) : col. Ill. ; 28 cm. LCCN 96012111, Grades 2-4.

So I did a little GREP homework and used TextWrangler to do the following:


What’s so neat about GREP is that I was able to place the ISBN in two places in the “Replace” box (the “\1” in the code): in the URL and in the visible text. Thanks, BBEdit GREP Tutorial.

Read More 

Review: The Innovators

Review: The Innovators

The Innovators: How a Group of Hackers, Geniuses and Geeks Created the Digital Revolution by Walter IsaacsonMy rating: 5 of 5 starsSomehow some writers of biography end up sounding trite, both in their relating of their subjects' stories and in the lessons they draw...

Ode to My iPad Pro

Ode to My iPad Pro

The subtitle for this blog used to be “Bible, Tech, Bible Tech.” I haven’t blogged about tech much in a long time. But I still love it. And it’s time for a break from heavy stuff. One particular piece of tech I love is my new-to-me 12.9-inch iPad Pro. I got it a few...

A Handy Guide to Catching Spam Comments

Look out for these things in your comment spam (some apply to email spam, too), and you're less likely to be fooled by it (click image to see full-size): I don't really mean that Australia is weird, though I may find out this summer that it is as I take my first trip...

How to Listen to Lots of Lectures and Sermons and YouTube Videos

How to Listen to Lots of Lectures and Sermons and YouTube Videos

Updated July 28, 2020 I see many interesting lectures and interviews on YouTube that I know I will never, ever have time for. I simply cannot sit in front of a computer and watch a video. Email beckons too hard. But I can listen to these videos on the bus, while doing...

Leave a comment.

  1. David

    I don’t want to be too pedantic, but technically “grep” is the UNIX command line tool for searching. What you’re actually using is regular expressions for searching *and* replacing. I actually fault TW for using the wrong terminology. I think they did it to imply the syntax is similar to grep, since grep does use regular expressions.

    In any event, searching for “regular expressions” on Google will probably give you some more helpful information. It’s also the phrase that most other editors use.

    Depending on which regular expressions dialect TW is using (traditional UNIX? PCRE?), you might find some more good information here:

    • Mark L Ward Jr

      Thanks! Insight from a real pro (aka true nerd!)!