Pages ’09: Major problems with Find/Replace case-matching

Posted by Pierre Igot in: Pages
June 2nd, 2009 • 10:10 am

The case-matching scheme used by Pages ’09’s Find/Replace feature is seriously screwed.

When you switch to the “Advanced” tab in the “Find/Replace” dialog box, you have the option to check a box labelled “Match case.” If you check it, then Pages ’09 restricts the search to occurrences that match the exact case of the text string you are looking for.

If you don’t check the option, then Pages ’09 ignores the case in its search for all the occurrences of the text string you are looking for. In other words, a search for “Word” with “Match case” off will find not just occurrences of “Word,” but also occurrences of “word,” “WORD“, “wOrd,” and so on.

The problem in Pages ’09 is with what happens if you try to replace the found occurrences of the text string with a different string or, indeed, with the same string, but with different style options.

Consider the following situation:

Various text strings and Find/Replace

I have a Pages ’09 document with various text strings and the “Find/Replace” dialog in the foreground instructing Pages to find occurrences of the first text string without matching the case. In the “Replace:” field, I have the exact same string (with the same case). This is what I would do, for example, if I wanted to apply a specific style to all occurrences of the text string.

Now consider what happens when I click on the “Replace All” button:

Replaced string with changed case

What on earth is that about? Pages ’09 has replaced my original string, which only had a capital letter on its first word, with the same string but with a capital letter on every word in the string!

This makes no sense whatsoever. No, I didn’t check the “Match case” option, but that does not mean that I have given Pages ’09 licence to change the case in the found string when replacing it with itself, i.e. with the exact same string (case included)!

In such a situation, with the “Match case” option off, the expected behaviour is that Pages ’09 will find all occurrences of the text string, ignoring the case, and will replace each occurrence with the exact same string, with the same combination of lowercase and uppercase. In other words, if I search for all occurrences of “title with initial capital” with “Match case” off, I expect Pages ’09 to include an occurrence such as “Title with initial capital” in the found occurrences. But if I also put “title with initial capital” in the “Replace:” field, I also expect Pages ’09 to be smart enough to replace “Title with initial capital” with the exact same string, i.e. “Title with initial capital,” and not with “Title With Initial Capital”!

The same problem extends to other lowercase/uppercase combinations. Say I search for “title with word caps” with “Match case” off:

String with word caps

My document includes an occurrence of “Title with Word Caps.” So I expect Pages ’09 to replace that occurrence with the exact same thing. Instead, again it changes the case:

Replaced string with changed case

Then I search for “title in all caps” with “Match case” off:

String with all caps

My document includes an occurrence of “TITLE WITH ALL CAPS.” So I expect Pages ’09 to replace that occurrence with the exact same thing. Instead, again it changes the case:

String with all caps

Finally I search for “title in lowercase” with “Match case” off:

String in lowercase

My document includes an occurrence of “title in lowercase.” So I expect Pages ’09 to replace that occurrence with the exact same thing… And it does. Phew!

In other words, the only time that Pages ’09 works as expected here is if the found text is all in lowercase. Otherwise, Pages ’09 arbitrarily changes the case of the found string when replacing it in itself.

This effectively makes Pages ’09’s Find/Replace feature useless for batch application of style formatting options to text strings in Pages documents. And it makes it highly unreliable for any find/replace operation if you are not using the “Match case” option.

If you combine this problem with the on-going difficulties that Pages ’09’s Find/Replace has when dealing with curly quotation marks and apostrophes, and with serious bugs such as the one described in yesterday’s post, and with Pages ’09’s failure to find whole word phrases when using the “Whole words” option, it adds up with a pretty poor and unreliable Find/Replace feature in Pages ’09.

It certainly cannot be used for any serious, professional-level work, especially on large documents, where the destructiveness of this unreliable feature might not be immediately apparent and might require lots of manual mopping up after its use.


Comments are closed.