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

Search any character except space using GREP

Explorer ,
Aug 24, 2021 Aug 24, 2021

Copy link to clipboard

Copied

Hi,

I am working on a document which consists of many footnotes, wherein, a footnote reference might be at the start of a word:

1.JPG 

I am trying to use GREP to find any footnote reference marker preceded as well as followed by any character (letter, punctuation, period or any other character) except for space.

 

I shall be grateful if anyone could help me with its GREP guery.

 

Thanks & Regards,

Aman

TOPICS
Scripting , Type

Views

799

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

Community Expert , Aug 24, 2021 Aug 24, 2021

Does the following help

(?<!\s)~F(?!\s)

-Manan

Votes

Translate

Translate
Community Expert ,
Aug 24, 2021 Aug 24, 2021

Copy link to clipboard

Copied

HI @amanm5143,

Try the following

[^\s]\K~F

-Manan

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 24, 2021 Aug 24, 2021

Copy link to clipboard

Copied

Hi Manan,

 

Thank you for taking out the time, and replying to the post. Much appreciated.

 

Grep suggested by you takes helps in finding all footnotes reference markers preceded by any character except space. Suggested GREP is capturing all footnotes preceded by any character except space, and followed by space:

2.JPG

It definitely helps in finding references without space at the beginning. I usually work with documents having 500+ footnotes. Is it possible to further extend the GREP such that it is able to find all footnotes markers preceded as well as followed by any character except space?

 

Thank you so much for the help!

Regards,

Aman

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 24, 2021 Aug 24, 2021

Copy link to clipboard

Copied

Does the following help

(?<!\s)~F(?!\s)

-Manan

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 24, 2021 Aug 24, 2021

Copy link to clipboard

Copied

Hi,

 

Worked like a charm! Amazing, you are.

 

Thank you so much for helping me out with this! Much appreciated.

 

Regards,

Aman

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 24, 2021 Aug 24, 2021

Copy link to clipboard

Copied

LATEST

Hi,

 

Worked like a charm! Amazing, you are!

 

Thank you so much for helping out. Much appreciated.

 

Regards,

Aman

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