DTP


 
Lively discussions on the graphic arts and publishing — in print or on the web


Go Back   Desktop Publishing Forum > General Discussions > Print Production & Automation

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 08-05-2009, 08:21 AM   #4
ktinkel
Founding Sysop
 
ktinkel's Avatar
 
Join Date: Oct 2004
Location: In Connecticut, on the Housatonic River near its mouth at Long Island Sound.
Posts: 11,189
Default

Quote:
Originally Posted by Mike View Post
Any idea as to how I'd go about using grep to replace double quotes with single while ensuring that quotes within quotes are double without also substituting apostrophes in possessives or abbreviations?

He said, "I was told, 'The Jones' songs of the '60s can't be compared to today's 'cos they're older,' by a real aficionado."

which needs to become:

He said, 'I was told, "The Jones' songs of the '60s can't be compared to today's 'cos they're older," by a real aficionado.'
I would start by replacing single quotes with different characters (## and ###, say). That leaves the opening apostrophe in the contracted date in limbo; depending on how much of that sort of thing I expect, I might just let it go, then fix it later.

Then replace all the opening double quotes with opening singles; then do the closing sets.

Finally, search on the ## and ### you set up before and convert those to opening and closing singles respectively.

Then root out the opening apostrophes and fix those yourself. (Or maybe someone knows a better way.)

   
__________________
[SIZE=2][COLOR=LemonChiffon]::[/COLOR][/SIZE]
[SIGPIC][/SIGPIC]
ktinkel is offline   Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Just the fax: fix or replace? marlene Business Matters 24 04-18-2007 07:31 AM
Tricky Font ID dthomsen8 Fonts & Typography 5 04-17-2007 12:56 PM
DW Search/Replace Regular Expressions Linda Baldwin Web Site Building & Maintenance 17 05-17-2006 08:41 AM
Replace a table with CSS ilox Web Design 7 08-22-2005 08:07 AM
You think fonts are tricky today? ktinkel Fonts & Typography 10 06-13-2005 02:18 PM


All times are GMT -8. The time now is 12:44 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Contents copyright 2004–2014 Desktop Publishing Forum and its members.