Simplest way to say search all spaces, except hair space

Community Beginner ,
Jul 16, 2021 Jul 16, 2021

Copy link to clipboard

Copied

I know I could list out all the space options separated by "|" but I want to be able to say \s but not ~| 

How do I say this simply in GREP? Is there a way to Escape something like this?

 

Here is my full GREP find: 

(?<!~<)( ?)(~_|~=|~-­|~~)( ?)(?!~<)

Change to: 

~|$2 ~|

But I want to change the ( ?) to (\s?) with this escape. What is the easiest way to do this?

TOPICS
How to

Views

52

Likes

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

Advisor , Jul 16, 2021 Jul 16, 2021
(?!~|)\s (^/)  The Jedi

Likes

Translate

Translate
Adobe Community Professional ,
Jul 16, 2021 Jul 16, 2021

Copy link to clipboard

Copied

If I am reading your intentions correctly, then you would not need to exclude the hair space from your search.

It would be a little redundant, in that it would replace any hair space it found with a hair space, but your end result would be the same as if you had skipped finding the hair spaces.

Likes

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 ,
Jul 16, 2021 Jul 16, 2021

Copy link to clipboard

Copied

The problem is that I'm looking for instances that don't have the hair space as a review stage. I don't want to replace all, I just want to find the examples that don't have it. 

Likes

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
Advisor ,
Jul 16, 2021 Jul 16, 2021

Copy link to clipboard

Copied

(?!~|)\s

 

(^/)  The Jedi

Likes

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 ,
Jul 16, 2021 Jul 16, 2021

Copy link to clipboard

Copied

LATEST

Added a ? to check for one or more, and it works! Thank you!

Likes

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