Unlike we Yanks, the Brits use single quotes to delimit dialogue. This poses a challenge for detecting unbalanced quotemarks in their books. The following two paragraphs illustate both a line with genuinely unbalanced quotes and one where the word "I'll" also includes a single quote which should be disregarded.
‘’Yo, Emily,’ she nodded, passing the departmental secretary.
‘Hi! With you in a sec.’ Emily lifted her finger from the ‘mute’ button, went back to glassy-eyed attention. ‘Yes, I’ll send them up as soon as –
’
The first paragraph has unbalanced quotes. I'd like to detect and bookmark such. I don't mind if the convention of using s followed by a single quote as possessive creates false positives. (James' dog)
Any help appreciated.
RegEx expression for quote check in British-typesets
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
-
- Posts: 35
- Joined: Thu Aug 02, 2007 8:50 pm
-
- Posts: 2461
- Joined: Sun Mar 02, 2003 9:22 pm
-
- Posts: 35
- Joined: Thu Aug 02, 2007 8:50 pm
Yes.
I get a fair number of false positives, but then, I do for american-style typesetting, too.
This is gorgeous and will be a great timesaver.
You, sir, are a wizard, and I thank you.
This is gorgeous and will be a great timesaver.
You, sir, are a wizard, and I thank you.