Found example was able to modify to get to work. I am quite sure it can be improved but this works to find first group.
Function TestRegExp(myPattern As String, myString As String) 'Create objects. Dim objRegExp As RegExp Dim colMatches As MatchCollection Dim RetStr As String ' Create a regular expression object. Set objRegExp = New RegExp 'Set the pattern by using the Pattern property. objRegExp.Pattern = myPattern ' Set Case Insensitivity. objRegExp.IgnoreCase = True 'Set global applicability. objRegExp.Global = True 'Test whether the String can be compared. If (objRegExp.Test(myString) = True) Then 'Get the matches. Set colMatches = objRegExp.Execute(myString) ' Execute search. RetStr = colMatches(0).SubMatches(0) Else RetStr = "String Matching Failed" End If TestRegExp = RetStr End Function Bill On May 19, 3:01 pm, "w.g.sned...@gmail.com" <w.g.sned...@gmail.com> wrote: > I am looking for syntax on how to capture a group in Excel > I am using Excel 2002 and referencing MS VBScript Regular Expressions > 5.5. > > my search string is this "10.10.10.132" > my regExp.Pattern = "10\.10\.10\.(.*)" > > How would I get just the "132" returned? > > When I hit F1 for help I do not find anything on RegExp. > > Maybe my question should be how do I find the help files for VBScript > Regular Expressions 5.5. > > I have googles this and found some examples but not the one I posting > here. > > Thanks in advance > Bill > > -- > ---------------------------------------------------------------------------------- > Some important links for excel users: > 1. Follow us on TWITTER for tips tricks and links > :http://twitter.com/exceldailytip > 2. Join our LinkedIN group @http://www.linkedin.com/groups?gid=1871310 > 3. Excel tutorials athttp://www.excel-macros.blogspot.com > 4. Learn VBA Macros athttp://www.quickvba.blogspot.com > 5. Excel Tips and Tricks athttp://exceldailytip.blogspot.com > > To post to this group, send email to excel-macros@googlegroups.com > > <><><><><><><><><><><><><><><><><><><><><><> > HELP US GROW !! > > We reach over 6,800 subscribers worldwide and receive many nice notes about > the learning and support from the group.Let friends and co-workers know they > can subscribe to group athttp://groups.google.com/group/excel-macros/subscribe -- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> HELP US GROW !! We reach over 6,800 subscribers worldwide and receive many nice notes about the learning and support from the group.Let friends and co-workers know they can subscribe to group at http://groups.google.com/group/excel-macros/subscribe