I've a problem when using Find. I want to find some patterns like the following:
- ABC-0123 DEF
- ABC-01234 DEF
- ABC-012345 DEF
- ABCD-0123 DEF
- ABCD-01234 DEF
This patterns can be found everywhere in the text. In the beginning of a line, in the end or in the middle. In RegExp I can use like "[A-Z]{3,5}-[0-9]{4,6} DEF", but this is not working in Wildcards.
In my function right now it first searches for "[A-Z]{3}-[0-9]{4} DEF", this will result in that ABCD-0123 DEF will be found in A BCD-0123 DEF (there is no space between the A and B..).
What can I use as character to check if the string/pattern is found without any other character before? Will this work if it's the first string in at a line?
I'll give a full example. I'll have a Word document with a text like this:
The raspberry is the edible fruit of a multitude of plant species in the genus Rubus of the rose family, ABD-0123 DEF most of which are in the subgenus Idaeobatus; the name also applies to these plants themselves. Raspberries are perennial with woody stems. ABCD-01323 DEF
ABCD-011223 DEF have all the details inside.
This is how the text can look. I now want the Macro to find all the different patterns that I've mentioned above and make them Bold.