Code: Select all
GuiControl,,StatusText, Searching subject for file numbers
FoundPos := RegExMatch(Haystack,"O)\b\d{4,6}\.\d{1,4}\b|\b\d{4,6}\/\d{1,4}\b",FoundNumber)
FoundCount := FoundNumber.Count()
GuiControl,,StatusText, Found: %FoundCount%
The above code produces zero matches.Re: 091795.0001 this also 055916.0002 and 96190.14 also 69190/11
Using regex101.com Broken Link for safety
All four matches are found
Changing the RegEx
Code: Select all
GuiControl,,StatusText, Searching subject for file numbers
FoundPos := RegExMatch(Haystack,"O)\b\d{4,6}(\.|\/)\d{1,4}\b",FoundNumber)
FoundCount := FoundNumber.Count()
GuiControl,,StatusText, Found: %FoundCount%
Using VBScript also finds all four matches with both RegExs
Am I missing something ?