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

Another GREP question from an old fart.

Explorer ,
Aug 10, 2021 Aug 10, 2021

Copy link to clipboard

Copied

I used to know these things but I an just too old and have no patience. I like  remove two types of strings from my long manuscript;

one is;

(2) where 

and 

p. 93 the digits can be up to 3.

 

Thanks so much in advance from the GREP gurus. 

TOPICS
How to , Scripting

Views

243

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

Guide , Aug 10, 2021 Aug 10, 2021

???

 

Find:  \(\d+\)

 

Find: p\.\h\d+\h

 

(^/)  The Jedi

Votes

Translate

Translate
Guide ,
Aug 10, 2021 Aug 10, 2021

Copy link to clipboard

Copied

???

 

Find:  \(\d+\)

 

Find: p\.\h\d+\h

 

(^/)  The Jedi

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
Explorer ,
Aug 10, 2021 Aug 10, 2021

Copy link to clipboard

Copied

Thanks the first is a bulls eye but the second do not work. 

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
Guide ,
Aug 10, 2021 Aug 10, 2021

Copy link to clipboard

Copied

The 2nd Grep code finds: a “p” followed by a dot “.” followed by a space followed by a number followed by a space! ... So it works!  =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
Community Expert ,
Aug 10, 2021 Aug 10, 2021

Copy link to clipboard

Copied

> the digits can be up to 3

 

I think like this

p\.\h\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
Community Expert ,
Aug 10, 2021 Aug 10, 2021

Copy link to clipboard

Copied

LATEST

Excuse me, I'll fix it a little

 

p\.\h\d{1,3}\b

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