I want to allow any 0 to 2 characters between each group in the (this is)?.??.??(an)?.??.??(example sentence)
regex. It should match the bolded text in the below strings:
blah blah. An example sentence
blah blah. This is an example sentence
Something something Example sentence
Now, in the first example, the match is ah. example sentence
. I thought adding 2 question marks to "." would mean that the regex engine will prefer to match 0 chars.
I'm using regex within VBA in MS Word, implemented by CreateObject("vbscript.regexp")
, which as I understand it uses the VBScript regex flavor, which as I understand it is the same as the JavaScript flavor.