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

Another Bug ?? Broken Search ?? CC 2023

Community Expert ,
Feb 02, 2023 Feb 02, 2023

Copy link to clipboard

Copied

Simple TextFrame with text:

 

" o o o o o o "

RobertTkaczyk_0-1675370484207.png

Try Find/Change and search for " o " - how many search results you'll get when you click FIND NEXT ?

Same problem when searching through Script ...

 

Or am I missing something ??

 

...

 

The same problem is with FireFox - screen from the current post:

RobertTkaczyk_1-1675370741511.png

 

WORD have the samme problem ??

RobertTkaczyk_0-1675370909266.png

 

 

TOPICS
Bug , Scripting

Views

231

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
Guide ,
Feb 02, 2023 Feb 02, 2023

Copy link to clipboard

Copied

That does not look right. GREPXtra finds them.

Screen Shot 2023-02-02 at 20.52.44.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
Community Expert ,
Feb 02, 2023 Feb 02, 2023

Copy link to clipboard

Copied

There are spaces between "o"s.

 

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 ,
Feb 02, 2023 Feb 02, 2023

Copy link to clipboard

Copied

I think you're expecting the space characters in the search to overlap.

 

In a string such as 'o-o-o-o-o-o' (with dashes standing in for spaces) there are only two examples of the string '-o-' as literals. Search doesn't start over and find the overlapping spaces for that.

 

Or did I miss your point?

 


┋┊ InDesign to Kindle (& EPUB): A Professional Guide, v3.1 ┊ (Amazon) ┊┋

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 ,
Feb 02, 2023 Feb 02, 2023

Copy link to clipboard

Copied

Yeah, maybe that's how it should work ...

 

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 ,
Feb 02, 2023 Feb 02, 2023

Copy link to clipboard

Copied

That is the behaviour I expect and I wouldn't want it any other way. Consider the common practice of searching for double linebreaks and replacing with a single linebreak: the difference between find \r\r (finds 2 linebreaks) and \r\r+ (finds two or more linebreaks). This distinction would go away if the find function worked the way you imply.

Another way to put it is: the find function interpreter advances to the end of the last match each time; it does not start again from the beginning, or look behind (unless grep deliberately asks it to).

- Mark

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 ,
Feb 02, 2023 Feb 02, 2023

Copy link to clipboard

Copied

Makes sense ... kind of ... but I'm looking for " o " - not "oo" - so every possible combination should be found and returned ?

 

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 ,
Feb 02, 2023 Feb 02, 2023

Copy link to clipboard

Copied

Not every combination, not with Search. Maybe with variations of GREP.

 

But 'oooooooooooo' would only return four instances of 'ooo,' not... some factorial multiple.

 


┋┊ InDesign to Kindle (& EPUB): A Professional Guide, v3.1 ┊ (Amazon) ┊┋

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 ,
Feb 02, 2023 Feb 02, 2023

Copy link to clipboard

Copied

Looks like it works as it supposed to work ...

 

If we have " o o o o o " - and then we start changing them to "-o-":

 

"-o-o o o o "

 

the 2nd " o " no longer exists as it's now "-o "

 

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
Guide ,
Feb 02, 2023 Feb 02, 2023

Copy link to clipboard

Copied

LATEST

Text search engines work with internal pointers and consume characters while processing the stream. When a match is found, the pointer advances next to that match. And that's usually what users expect, in particular when replacements are involved. Breaking this rule would have serious consequences on many programs.

 

Now you can still prevent a search from consuming characters, using lookbehind/lookahead assertions. In your example, each 'o' preceded and followed by a space can still be captured (and changed) using a GREP pattern like (?<= )o(?= ).

 

Marc

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