It’s usually best to look for a macro route when searching for fields, because, as you say, the search algorithm that uses Word does not work as you might expect with fields.
But if you know exactly what the fields contain, you can specify a search pattern that is likely to work (but not in wildcard mode).
For example, if you want to find pairs of fields of number number, for example
{ STYLEREF 1 \s }.{ SEQ Figure \* ARABIC \s 1 }
(which will usually be the same set of fields in the document)
If you really need to look for the following:
{ STYLEREF 1 \s }.<any field>
you can make sure that field codes are displayed and search
^d STYLEREF 1 \s ^21.^d
or
^19 STYLEREF 1 \s ^21.^19
If you need to be more precise, you can also specify a second field.
"^ d" only works to find the beginning of the field, not the end of the field.
It’s a pity that ^ w wants to find at least 1 space character, because otherwise it would be more reliable to search
^19^wSTYLEREF^w1^w\s^w^21.^19
Perhaps someone knows how to get around this without using wildcards?
user1379931
source share