Avatar of Andreas Hermle
Andreas Hermle
Flag for Germany asked on

'search expression is too complex' error when using wildcard search

Dear Experts:

I was gonna search for numbers with the following make-up in the current document witht the following search expression ('use wildcards' is checked)

Numbers to be searched: 77-88-23-44, 99-22-34-11 etc.

Search expression: <[0-9][0-9]-[0-9][0-9]-[0-9][0-9]-[0-9][0-9]>

I am greeted with the following prompt when running the search operation: 'The expression in the search field is too complex'

Any idea from the experts what is wrong with my expression.

Thank you very much in advance for your professional help.

Regards, Andreas
Microsoft Word

Avatar of undefined
Last Comment
Andreas Hermle

8/22/2022 - Mon
aikimark

Can you use this non-wildcard search?
^#^#-^#^#-^#^#-^#^#

Open in new window

aikimark

For some reason, the Word wildcard search would rather have you indicate the repeated digits than have you double the [0-9] pattern.
<[0-9]{2}-[0-9]{2}-[0-9]{2}-[0-9]{2}>

Open in new window

Andreas Hermle

ASKER
Hi aikimark,

thank you very much for your swift and professional help. Ok, great, this works just fine.

So, searching with wildcard characters is not possible in the above case, do I get his right?

And another question: As a matter of fact, I need to add -09 at the end to all numbers found, i.e.

Before: 77-88-23-44   After: 77-88-23-44-09
Before: 99-22-34-11   After: 99-22-34-11-09
Before: 33-24-72-53   After: 33-24-72-53-09

Help is much appreciated. Thank you very much in  advance.

Regards, Andreas
Your help has saved me hundreds of hours of internet surfing.
fblack61
ASKER CERTIFIED SOLUTION
aikimark

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Andreas Hermle

ASKER
Hi akimark,

oh, great job, works like a charm. Thank you very much for it.  I highly appreciate it.

One more thing which I would like to draw your attention to:
If I replace all the numbers as you suggest with your search and replace action once, everything works out fine.
If I inadvertently repeated it, it would add the -99 once again.

Can't I resrict the search operation to just numbers with the following make-up ##-##-##-## (54-33-22-11), i.e. max of 4 pairs of two-digit numbers.
The current search term would also find numbers such as 54-33-22-11-09

Help is much appreciated. Thank you very much in advance.

Regards, Andreas
Andreas Hermle

ASKER
here the graphic that supports my questionrepeated search and replace operations
aikimark

You might look for a "not hyphen" character instead of ">"
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Andreas Hermle

ASKER
Ah ok, great I got that, thank you very much for your great and professional help.
Andreas Hermle

ASKER
Thank you very much for your valuable help. Regards, Andreas