Re: String Pattern Matching
Re: String Pattern Matching
You could also use the Instr() function to find the position of "Last message received on" and then parse out the required number of characters using Right$() and Left$() or MID$() functions.
Re: String Pattern Matching
I solved my problem using this Regular Expression (& late binding, of course ;) ):
Code:
'Create our regular expression object which matches the example: 6/26 at 10:35 PM
Set reLastMsg = CreateObject("VBScript.RegExp")
With reLastMsg
.Pattern = "\d{1,2}.\d{1,2}\s\w{2}\s\d{1,2}:\d{2}\s\w{2}"
.Global = True
.IgnoreCase = True
End With
Re: String Pattern Matching
Please mark your thread Resolved