Skip to main content
smashkirk
Inspiring
January 31, 2017
Answered

Quick easy GREP question

  • January 31, 2017
  • 2 replies
  • 492 views

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

This topic has been closed for replies.
Correct answer Obi-wan Kenobi

By security:

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

2 replies

uniqued_tol
Inspiring
January 31, 2017

^\d+?\.\h*


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

Obi-wan Kenobi
Obi-wan KenobiCorrect answer
Legend
January 31, 2017

By security:

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

smashkirk
smashkirkAuthor
Inspiring
January 31, 2017

Thank you, thank you, thank you!

uniqued_tol
Inspiring
January 31, 2017

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

smashkirk
smashkirkAuthor
Inspiring
January 31, 2017

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