![]() |
|
#1
|
|||
|
|||
![]()
Hi,
I have a bunch of chapters and sub-chapters in a book in which the numbering works as follows: X.X (e.g. 2.1) X.XX (e.g. 2.11) X.X.X (e.g. 2.1.1) X.X.XX (e.g. 2.1.11) X.XX.X (e.g. 2.11.1) I want to know if it's possible to do a wildcard search that could capture all these possible combinations (I don't think there's a specific "or" operator). I have an expression that covers the last three but not the first two: Code:
([0-9]@.[0-9]{1,2}@.)([0-9]{1,2}) When I'm dealing with very specific references where I know what comes before and after (like a tab/para mark or specific punctuation/text) I can modify it to cover everything, but I'm looking for something that would pick it up under (almost) all circumstances. My instinct is that it's not possible, but would like confirmation from an expert before I give up! Thanking you in advance |
#2
|
|||
|
|||
![]()
The following wild card search would capture all 4 of your examples:
[0-9].[0-9]{1,2}.{0,1}[0-9]{1,2} |
#3
|
||||
|
||||
![]()
Simpler:
Find = <[0-9]@.[0-9.]{1,}
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
![]() |
Tags |
wildcards |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Wildcard Search | gmaxey | Word VBA | 4 | 07-12-2020 05:13 PM |
![]() |
MikeForward | Word VBA | 3 | 02-19-2019 03:23 PM |
![]() |
MikeForward | Word | 9 | 02-19-2019 01:27 AM |
Where is the error in my wildcard search? | Ulodesk | Word | 10 | 06-30-2014 01:46 PM |
Wildcard search help. | Kempston | Word | 0 | 11-13-2009 03:58 AM |