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

Quick easy GREP question

Participant ,
Jan 31, 2017 Jan 31, 2017

Copy link to clipboard

Copied

Hi I'm looking for GREP to style the numbers below:

1.     This is text

22.    This is text

140.  This is text

So, the code should select 1-3 numbers followed by a period.

Can anyone tackle that for me?

Thanks,

Ash

TOPICS
Scripting

Views

344

Translate

Translate

Report

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 , Jan 31, 2017 Jan 31, 2017

By security:

^\d{1,3}\.(?=\h)

Votes

Translate

Translate
Participant ,
Jan 31, 2017 Jan 31, 2017

Copy link to clipboard

Copied

^\d+?\.\h*(.)

Votes

Translate

Translate

Report

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
Participant ,
Jan 31, 2017 Jan 31, 2017

Copy link to clipboard

Copied

Thank you for your quick response. However this code is causing the first character of the text (This is text) to be styled, which I don't want. Only the numbers and period.

Thanks

Votes

Translate

Translate

Report

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
Participant ,
Jan 31, 2017 Jan 31, 2017

Copy link to clipboard

Copied

^\d+?\.\h*


If you do not want to find space: ^\d+?\.

Votes

Translate

Translate

Report

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 ,
Jan 31, 2017 Jan 31, 2017

Copy link to clipboard

Copied

By security:

^\d{1,3}\.(?=\h)

Votes

Translate

Translate

Report

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
Participant ,
Jan 31, 2017 Jan 31, 2017

Copy link to clipboard

Copied

LATEST

Thank you, thank you, thank you!

Votes

Translate

Translate

Report

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