GREP: Lookbehind UND Lookahead
(I hope you don't mind my writing English)
Two comments about things raised about GREP here. As Marco mentioned, any alternatives in a lookbehind list should be the same length. All GREP implementations have this, it's not a 'feature' of InDesign. Allegedly, allowing for different-length alternatives in lookbehind makes expressions hopelessly inefficient (see Friedl, 'Mastering Regular Expressions, O'Reilly). You can work around this limitation, though, by listing them separately:
This expression matches all spaces preceded by S. or Anm. and followed by a digit. The limitation applies only to lookbehind: in lookaheads, alternatives needn't be the same length.
As to the o+umlaut, this character can be represented by unicode 00F6 and by unicodes 006F + 0308 (the plain o followed by the umlaut from the combining diacriticals. (In InDesign you can't see the difference between the two: it shows the o+umlaut as a single character even if you enter o and 0308 separately; this is new in CS3.) You can match any of these by using a wildcard that generalises over accents, \X (capital X):
matches 'möglichkeit' no matter how o+umlaut was entered, as 00F6 or as 006F+0308. (\X matches any character with any number of following diacritics from the range 0300-0362.)
Hope this is of any use.
als Antwort auf: [#310941]