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

How to ignore diacritics in scripted .Grep search

Explorer ,
Oct 30, 2016 Oct 30, 2016

I know I can do it in a text search -- but I need pattern matching, which means grepping

Is it possible? I looked at findGrepPreferences and didn't see a flag...

Thanks

TOPICS
Scripting
867
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

LEGEND , Oct 30, 2016 Oct 30, 2016

Assuming you want Hebrew diacritics, it would be something like this:

[\\x{0591}-\\x{05C4}\\x{05A2}-\\x{05C7}]{0,4}

Translate
LEGEND ,
Oct 30, 2016 Oct 30, 2016

I don't think the option exists for GREP, but you don't really need it. You can just add optional diacritics to your GREP pattern.

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
Mentor ,
Oct 30, 2016 Oct 30, 2016

Yep, ignoreDiacritics in findChangeTextOptions but not findChangeGrepOptions

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 ,
Oct 30, 2016 Oct 30, 2016

You can use [[=a=]] to match 'a' and all accented variants (acute, grave, etc.). Same for all other letters. Could make for some awkward regular expressions, but you should be able to get it to work.

Peter

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
LEGEND ,
Oct 30, 2016 Oct 30, 2016
LATEST

Assuming you want Hebrew diacritics, it would be something like this:

[\\x{0591}-\\x{05C4}\\x{05A2}-\\x{05C7}]{0,4}

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