In a previous Blog entry I wrote about the GREP search capability in InDesign CS3. GREP searches are great for making a computer recognize complex patterns. I recently developed the following GREP string for a client, and thought I'd share it here, hoping you might find it useful or educational.
The procedure below will allow you to quickly search for all URL's (Web addresses) in your text, and format them as non-breaking, or blue, or whatever formatting you wish.
1. Start InDesign, and choose Edit > Find/Change
2. Type the string below into the Find what: field (all on one line)
3. Copy the string below into the Change to: field
4. Click on the More Options button, and then click on the magnifying glass icon next to the Change Format area. Enter whatever formatting you would like here, then click the OK button.
5. Click on the small disc icon at the top of the Find/Change dialog box, and give the Query a name. Now, any time that you want to find and change URL's, you can just choose this name from the Query drop-down list, indicate the scope of the search, and click on the Find button. Another GREP example is here.