Bug in Search and Replace

Operating System Windows 11

Papyrus Author Version 11.05a

When searching for punctuation, the “Whole Word” option checkbox changes the behavior and does not find correctly.

  1. Enter text in the document and include a semicolon. (:wink: The text must have a letter before the ; as in here is text;
  2. Open Search (Ctrl-F)
  3. Put a ; in the search box.
  4. Check Whole Word
  5. Click Find.
  6. Observe that No Match is Found
  7. Uncheck Whole Word
  8. Click FInd
  9. Observe that ; is found.

This can be the case with a Period, colon, etc.

I guess this is intended behaviour. If you check the whole word option, then the semicolon needs to be free-standing, i.e. surrounded by white space, to be found. If it’s directly preceded by a word, then it belongs to that string of characters and it’s not a word on its own anymore.

2 Likes

OK. It is not consistent though. If I have text like
Horace; was a horse
Searching for the whole word “Horace” finds “Horace” so the semicolon isn’t considered as part of the word in that case. But if you search for ; it is considered part of the word unless preceded by a space? It might be intended as you say. But try the combinations and see if you think it works the way a user would intend to use it. Maybe the intention should be recinsidered.
Thanks again.

No, I’ve reconsidered. This is a bug. If it were intended behavior, it would be consistent.

I disagree. Perhaps because my mind is too nerdy to see the inconsistency :slight_smile:

When selecting words by double clicking, keyboard shortcuts, or finding them with the Find/Replace window, Papyrus needs to decide where a word starts and where it ends. This is usually done by internally defining ranges of characters that can be in a word (letters, hyphen, apostrophe), characters that are in-between words (white space such as space, nonbreaking space, line ends, paragraph ends, page breaks, tabulators, etc.) and punctuation (dots, commas, colons, semicolons, quotes, dashes, etc.).

If you are searching for a semicolon without the »whole word« option, Papyrus will find the single character that you asked for. If you check the »whole word« option, Papyrus cannot find it because the semicolon is not in the group of characters that are permitted in a word.

I think the »whole word« option is primarily intended for languages in which words can be used on their own or in composite words. Remember that Papyrus was developed in Germany where this happens very frequently.

2 Likes

Sam, is there a more official ruling on this? What does the dev team think about it?

I’ll send this information to the development team for confirmation. :slight_smile:

Thank you @marilynfoxworthy and @glucose !