Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Punctuation wild card - GREP

Explorer ,
Feb 05, 2021 Feb 05, 2021

In GREP, is there a wildcard for any puncuation? I don't want to find letters, digits, or spaces, only punctuation. For example: 

 

I wrote a GREP to identify errors with using a comma. 

FIND WHAT: ([\u\l]|\d)( , | ,+ | ,+| ,|,|,+|,,+ |,  |, , )([\u\l]|\d)

CHANGE TO: $1, $3

But I want to be able to find an error in any instance not just letters/digits for my $1 and $3

TOPICS
How to
2.3K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Feb 05, 2021 Feb 05, 2021

Any Punctuation

[[:punct:]] matches any punctuation: dots and commas, dashes and hyphens, braces, brackets, and parentheses, all quotation marks, etc. Like character equivalents, this wildcard must be entered as a list. It can be combined with other wildcards, literals, and markers. For example, use ~F[[:punct:]] to find footnote markers (~F) followed by any punctuation.

—from @Peter Kahrel's GREP in InDesign CS3 book
    https://www.amazon.com/GREP-InDesign-InDesignSecrets-Peter-Kahrel/dp/0982508387

...
Translate
Community Expert ,
Feb 05, 2021 Feb 05, 2021

Any Punctuation

[[:punct:]] matches any punctuation: dots and commas, dashes and hyphens, braces, brackets, and parentheses, all quotation marks, etc. Like character equivalents, this wildcard must be entered as a list. It can be combined with other wildcards, literals, and markers. For example, use ~F[[:punct:]] to find footnote markers (~F) followed by any punctuation.

—from @Peter Kahrel's GREP in InDesign CS3 book
    https://www.amazon.com/GREP-InDesign-InDesignSecrets-Peter-Kahrel/dp/0982508387 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 05, 2021 Feb 05, 2021

Thank you!!!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 05, 2021 Feb 05, 2021

Peter's book is a great resource. I highly recommend it.

 

~Barb 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 05, 2021 Feb 05, 2021

I will need to check it out!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Feb 05, 2021 Feb 05, 2021
LATEST

The problem is that posix is truly too bad just knowing what it catches!

 

(^/)  The Jedi

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines