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

GREP – Need a way to find all Instances of "Plate" preceeded by a word with a capital letter

Community Beginner ,
Apr 28, 2017 Apr 28, 2017

Copy link to clipboard

Copied

Hi all,

I'm really struggling to work this one out and I feel like I need a double lookbehind or something crazy. I need to assign a No Break to every instance of "Xxxx Plate". The names of the plates are somewhat abstract so I'm defining them as any word preceding the word "Plate" that has a capital letter in it. So it would No Break "Lovely Plate", "Sooper Plate" but not "our Plates" or "this particular Plate".

(?<=\<)\u seems to find the capital letter in the words, but I want the space after it, and only if that space is proceeded by the word Plate.

I'm lost, basically. I've been going round and round and can't work out a solution. Not even close, tbh.

Any help would be hugely appreciated.

Matt

TOPICS
Scripting

Views

458

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 , Apr 28, 2017 Apr 28, 2017

\b\u[\w-]+\hPlate\b

(^/)

Votes

Translate

Translate
Participant ,
Apr 28, 2017 Apr 28, 2017

Copy link to clipboard

Copied

\b\u.+?\b\h\bPlate\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
LEGEND ,
Apr 28, 2017 Apr 28, 2017

Copy link to clipboard

Copied

\b\u[\w-]+\hPlate\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
Community Beginner ,
Apr 28, 2017 Apr 28, 2017

Copy link to clipboard

Copied

Ask I suspected, I was a million miles away. Thank you for your help, I'll deconstruct it so I know better next time.

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 Beginner ,
May 09, 2017 May 09, 2017

Copy link to clipboard

Copied

Dare I ask to pick your brain again? My client has now added a two word plate title, so it reads Sooper Blue Plate. It's always capitalised, so I've been trying to adjust the GREP you gave me with a "Find any capitalised words together with Plate and don't break", but again I'm falling short. I get that we looking for a word boundary with a cap, with any white space before the word Plate, but I can't figure (again) how to make it more than one word before Plate.

If you're able to help again, could you possibly give me a hint as to what I'm missing. I'm desperately trying to learn GREP, but it's not my forte at the moment.

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 ,
May 09, 2017 May 09, 2017

Copy link to clipboard

Copied

\b\u[\w-]{2,}\hPlate\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
Community Beginner ,
May 09, 2017 May 09, 2017

Copy link to clipboard

Copied

That doesn't Seem to help, sorry. I'm testing it with the sentence "Light Blue Plate with a Sooper Yellow Plate right next to a Soot Grey Plate and a Light Red Plate", but it still breaks the first capitalised instance. I really need it not break "Light Blue Plate" etc. Can I trouble you again? Thank you for your help so far.

Screen Shot 2017-05-09 at 17.22.29.png

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 ,
May 09, 2017 May 09, 2017

Copy link to clipboard

Copied

Oups!

(\b\u[\w-]+\h){2,}Plate\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
Community Beginner ,
May 09, 2017 May 09, 2017

Copy link to clipboard

Copied

LATEST

Amazing! 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