Highlighted

Search for "no space" before / after word?

Engaged ,
Aug 05, 2020

Copy link to clipboard

Copied

Howdy-

I'm trying to find a way to search for a "lack" of a space-

 

For example, I have received a document in which each period has been replaced with a double hash (##).

Some also have the space after deleted, so what I have can look like this:

 

...went to the school on Thursday## Burritos were the main thing....

or

...went to the school on Thursday##Burritos were the main thing....

 

Is there a way to search for "##" without a space before or after?

Was hoping to find a symbol, but alas...

thanks!

Most Valuable Participant
Correct answer by Jongware | Most Valuable Participant

You can use GREP to search for a not-a-space character with the code \S (the inverse of \s – "any whitespace"). But what do you want to do next?

 

If tepkace with full-stop plus a space: You can use a more complicated GREP (because it must preserve whatever character is there) but it may be easier to just change ## to full-stop * space, and then replace all double spaces with one.

TOPICS
How to

Views

28

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

Search for "no space" before / after word?

Engaged ,
Aug 05, 2020

Copy link to clipboard

Copied

Howdy-

I'm trying to find a way to search for a "lack" of a space-

 

For example, I have received a document in which each period has been replaced with a double hash (##).

Some also have the space after deleted, so what I have can look like this:

 

...went to the school on Thursday## Burritos were the main thing....

or

...went to the school on Thursday##Burritos were the main thing....

 

Is there a way to search for "##" without a space before or after?

Was hoping to find a symbol, but alas...

thanks!

Most Valuable Participant
Correct answer by Jongware | Most Valuable Participant

You can use GREP to search for a not-a-space character with the code \S (the inverse of \s – "any whitespace"). But what do you want to do next?

 

If tepkace with full-stop plus a space: You can use a more complicated GREP (because it must preserve whatever character is there) but it may be easier to just change ## to full-stop * space, and then replace all double spaces with one.

TOPICS
How to

Views

29

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
Aug 05, 2020 0
Most Valuable Participant ,
Aug 05, 2020

Copy link to clipboard

Copied

You can use GREP to search for a not-a-space character with the code \S (the inverse of \s – "any whitespace"). But what do you want to do next?

 

If tepkace with full-stop plus a space: You can use a more complicated GREP (because it must preserve whatever character is there) but it may be easier to just change ## to full-stop * space, and then replace all double spaces with one.

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
Reply
Loading...
Aug 05, 2020 1
Engaged ,
Aug 05, 2020

Copy link to clipboard

Copied

Thanks! I just want to replace with a space.

Would be great if you could script a more complex find/replace, like actions work in other Adobe stuff.

I guess maybe you can, but I don't know much about GREP.

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
Reply
Loading...
Aug 05, 2020 0