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

Grep String Help

New Here ,
Dec 17, 2014 Dec 17, 2014

So I'm trying to create GREP styling to help making a project faster.  I'm trying to have everything between a period and a comma character styled, or between a period and the word 'by or at'

This is what I have so far:

(?<=\.).+?(((\s)(?i)by(\s))|((\s)(?i)at(\s))|(?=,))

My issue is that a date sometimes appears, Dec. 2, and because it's between the period and comma it gets the character style. How can I eliminate that, or tell it to ignore digits or make it only do it to one or more words?

Help!

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

Mentor , Dec 17, 2014 Dec 17, 2014

Quick shot:

instead of .+? try \D+?

that means "everything except digits".

Translate
Mentor ,
Dec 17, 2014 Dec 17, 2014

Quick shot:

instead of .+? try \D+?

that means "everything except digits".

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
New Here ,
Dec 17, 2014 Dec 17, 2014
LATEST

Ah that worked!! I did

(?<=\.)(\D+?)(((\s)(?i)by(\s))|((\s)(?i)at(\s))|(?=,))

Man, I was searching everywhere. Thanks so much!!

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