Word 2003(vba) wildcard for search pattern. RRS feed

  • Question

  • Hi,

        In MsWord 2003, I searched the following pattern in wildcard. In this, if superscript letters comes within a word in close up, this pattern not search for the word "micro".

    Someone help me if you have answer for this.

    Pattern: ([a-z]{1,}) , Non Superscript

    Example searchable data: micro<sup>reg</sup>soft

    Adv. Thanks & Regards,

    Raja E.

    Wednesday, September 28, 2011 5:09 AM

All replies

  • I would say that was a bug. Unfortunately Word's attempt at regular expressions in Find and Replace is not very good :-(
    It seems to look forward the maximum number of characters (255 when not specified) and if it includes a superscript, skips past the superscript and starts again, so "[a-z]{1,5}" works for this particular case but is useless more generally.
    I can't see any obvious work around. Using "[a-z]@" does find all non-superscripted characters, but one at a time.

    Wednesday, September 28, 2011 11:10 AM