Hi,I'm wondering how to use a regular expression to find a 10 digit number in any email, i.e. a new email arrives, and a sub or function searches the email for a 10 digit number and holds it in a variable.... any ideas?Cheers
Hi,I'm wondering how to use a regular expression to find a 10 digit number in any email, i.e. a new email arrives, and a sub or function searches the email for a 10 digit number and holds it in a variable.... any ideas?Cheers
Guys,I've got this [/code]Sub ValidFileName() Dim RegEx As Object Dim number As Long number = 123456789 Dim valid As Boolean Set RegEx = CreateObject("vbscript.regexp") RegEx.Pattern = "\d{10}" valid = RegEx.test(number) Set RegEx = NothingEnd Sub[code]i just need to use a find method to run through the emails?