<" not working

General comments and questions. Technical support.
Post Reply
DaleDe
Posts: 84
Joined: Thu May 02, 2013 7:28 pm
Location: Grass Valley, CA, USA
Contact:

<" not working

Post by DaleDe »

I tried using <" with wildcards checked to find beginning quotes but none were found. <<" worked as expected.

Dale
Robert
Posts: 1906
Joined: Fri Aug 15, 2003 8:27 pm

Post by Robert »

Hi Dale,
You should have used the following expression instead:

Code: Select all

“<
< means the beginning of a word. You cannot find a quote mark after the beginning of a word.
On the other hand, << means the beginning of a paragraph. You can find a quote mark starting a paragraph.

HTH.
Cheers,
Robert
DaleDe
Posts: 84
Joined: Thu May 02, 2013 7:28 pm
Location: Grass Valley, CA, USA
Contact:

Post by DaleDe »

Thanks very much, works well now. I understand the " mark is ahead of the word, not a part of the word. I thought it was part of the word.

Dale
Robert
Posts: 1906
Joined: Fri Aug 15, 2003 8:27 pm

Post by Robert »

A “word” is what you find listed in a dictionary index. Dictionary entries do not include quote marks.
DaleDe
Posts: 84
Joined: Thu May 02, 2013 7:28 pm
Location: Grass Valley, CA, USA
Contact:

Post by DaleDe »

Is a number part of a word? I have thought of words as characters surrounded by white space but clearly that is wrong here.

Similarly I am trying to find the closing quote and cannot find something that will work. Is it possible?

>[.?,!;:]" will not find a closing quote not at the end of a sentence or phase and >" will only find words without punctuation. Perhaps I need two searches.

Dale
DaleDe
Posts: 84
Joined: Thu May 02, 2013 7:28 pm
Location: Grass Valley, CA, USA
Contact:

Post by DaleDe »

Note also that the example in the help for the new features shows <<<*> and says it will find the first word of a paragraph. This is only true if the first word of the paragraph is not part of a quotation. <<*<*> will work always.

Dale
User avatar
admin
Site Admin
Posts: 2926
Joined: Wed Jun 05, 2002 10:48 pm
Contact:

Post by admin »

Is a number part of a word?
Yes, it is.
Similarly I am trying to find the closing quote and cannot find something that will work. Is it possible?
It is possible.
>[.?,!;:]" will not find a closing quote not at the end of a sentence or phase and >" will only find words without punctuation. Perhaps I need two searches.
You can use the following "Find what" expression:

>[.?,!;:]{0,1}"

The "{0,1}" repetition counter after "[.?,!;:]" means that a punctuation sign before a quote is optional.

If you add an environment delimiter "|", the punctuation sign would not be highlighted in the document window:

>[.?,!;:]{0,1}|"
User avatar
admin
Site Admin
Posts: 2926
Joined: Wed Jun 05, 2002 10:48 pm
Contact:

Post by admin »

Note also that the example in the help for the new features shows <<<*> and says it will find the first word of a paragraph. This is only true if the first word of the paragraph is not part of a quotation. <<*<*> will work always.
* can match too much text. It should be used with care. * should be avoided within "Find what" expressions whenever possible. For example, the first asterisk in your above "Find what" expression can catch multiple "word-less" paragraphs (blank paragraphs, or paragraphs containing punctuation signs only).

I would use a more strict pattern:

<<"{0,}<*>

{0,} means that a quote is optional.

If quotes should not be reported (highlighted), you could use the following expression:

<<"{0,}|<*>
Post Reply