From: "Tony Jollans" My forename at my surname dot on 19 Mar 2010 04:52 Word's F&R pattern matching is one of a kind. I have never seen any documentation that even suggests the notion that an expression can be too complex. Come to think of it I have rarely seen documentation that definitevely states anything. All you can really do is experiment. On occasion I have been surprised to find what I thought quite simple proved too complex for Microsoft; on other occasions, it has sailed with ease through things I thought might prove difficult. I have wondered whether 'too complex' might depend on external factors like memory, but your example fails for me too, so maybe you have a concrete rule - if you find any more, do let us know! -- Enjoy, Tony www.WordArticles.com "George Lee" <GeorgeLee(a)discussions.microsoft.com> wrote in message news:8D44C5E1-BBBD-4462-A5EA-5DB4EEE90C10(a)microsoft.com... > Thanks. I know these examples were contrived and I have workarounds. I was > asking more what the conditions of a "too complex" of a pattern were. > Microsoft doesn't seem to publish those. > > "Doug Robbins - Word MVP" wrote: > >> Instead of constructions such as: >> >> [0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9] , >> >> Use >> >> [0-9]{#} >> >> where # is the number of digits that you are seeking. or {#,} where you >> are >> seeking at least # digits, {#,##} where you are seeking between # and ## >> digits. >> >> -- >> Hope this helps. >> >> Please reply to the newsgroup unless you wish to avail yourself of my >> services on a paid consulting basis. >> >> Doug Robbins - Word MVP, originally posted via msnews.microsoft.com >> >> "George Lee" <GeorgeLee(a)discussions.microsoft.com> wrote in message >> news:943E632F-1228-45FE-A75C-CA54F38CCCA9(a)microsoft.com... >> > Simple cases: >> > [0-9][0-9][0-9][0-9][0-9][0-9][0-9] ' OK >> > [0-9]@[0-9]@[0-9]@[0-9]@[0-9]@[0-9]@[0-9]@ 'OK >> > [0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9] 'too long >> > >> > From these it looks like seven brackets are the maximum. Is there >> > confirmation of this somewhere? Is this the only condition? >> > >> > "Fumei2 via OfficeKB.com" wrote: >> > >> >> Can you post what the pattern is? >> >> >> >> George Lee wrote: >> >> >"The Find What text contains a Pattern Match expression which is too >> >> >complex." >> >> > >> >> >What is the rule for being too complex? I can't determine the rule >> >> >just >> >> >by >> >> >playing with it. It's not character limited (other than 255), and it >> >> >doesn't >> >> >seem to be "item" limited (like no more than ten []{} pairing). >> >> >> >> -- >> >> Gerry >> >> >> >> Message posted via OfficeKB.com >> >> http://www.officekb.com/Uwe/Forums.aspx/word-programming/201003/1 >> >> >> >> . >> >>
First
|
Prev
|
Pages: 1 2 Prev: Plural/Possessive Options Next: Insufficient memory and DisplayAlerts None |