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

Find/Change GREP

Community Beginner ,
Jun 12, 2018 Jun 12, 2018

Hello,

From the Find/Change window and in the GREP tab, I would like to be able to search for 1st and replace with 1st. In fact I'd like to put in exposing the st but not the 1.

I hope you understood me    

Thank you in advance for your help,

Guig

895
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

Guide , Jun 12, 2018 Jun 12, 2018

You could even use a grep style to apply superscript to all ordinals:

(?<=\d)(st|nd|rd|th)\b

Translate
Guide ,
Jun 12, 2018 Jun 12, 2018

grep find:

1\Kst

change

format superscript

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 ,
Jun 12, 2018 Jun 12, 2018

You could even use a grep style to apply superscript to all ordinals:

(?<=\d)(st|nd|rd|th)\b

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
Enthusiast ,
Jul 05, 2018 Jul 05, 2018

Did either of these solutions work for you? It's helpful to hear back if the solution worked (or not). I can't speak for others, but I know that GREP is something that takes me a while to craft (though I enjoy it), so it's helpful if we get feedback as to whether it solved your problem.

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 ,
Jul 05, 2018 Jul 05, 2018
LATEST

Of course the 2 codes work! [CS6 and + for the first]

Everybody understood Vincent's code is more global because it includes 2nd, 3rd, 4th, 5th …

Best,

Michel, for FRIdNGE

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