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?
(?!~|)\s
(^/) The Jedi
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.
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.
Copy link to clipboard
Copied
(?!~|)\s
(^/) The Jedi
Copy link to clipboard
Copied
Added a ? to check for one or more, and it works! Thank you!