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

GREP question

Community Beginner ,
Feb 06, 2018 Feb 06, 2018

In a doc, I have to modify series of roman numbering written

"(i)"

"(ii)"

"(iii)"

"(iv)"

"(v)"

When I grep, within a paragraph style

\(\i\) , I do find "(i)"

\(\i\i\) , I do find "(ii)"

\(\i\i\i\) , I do find "(iii)"

but when I grep

\(\i\v\) , I DO NOT FIND "(iv)"

\(\v\) , I DO NOT FIND "(v)"

why ?

919
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 06, 2018 Feb 06, 2018

Because you are escaping everything. You only have to escape characters that are (1) meaningful in a GREP expression, and (2) you want to find literally.

\( matches a literal ( because the '(' means something in a GREP expression. \i matches 'i' because \i means nothing special (and escaping non-special characters does nothing to the original), but \v is the GREP code for a vertical tab.

Just use this

\(iv\)

and it will work. To find any roman number up to 8, you can use this:

\([iv]+\)

(although it w

...
Translate
Community Expert ,
Feb 06, 2018 Feb 06, 2018

Because you are escaping everything. You only have to escape characters that are (1) meaningful in a GREP expression, and (2) you want to find literally.

\( matches a literal ( because the '(' means something in a GREP expression. \i matches 'i' because \i means nothing special (and escaping non-special characters does nothing to the original), but \v is the GREP code for a vertical tab.

Just use this

\(iv\)

and it will work. To find any roman number up to 8, you can use this:

\([iv]+\)

(although it will also match invalid roman numerals – if these may occur in your text, don't do a Change All).

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 Beginner ,
Feb 06, 2018 Feb 06, 2018
LATEST

Thanks a lot.

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