Regular Expression Matching... delete part of the match

I havnt used RE's too much.  This might be a really easy question, but i have no clue.  The code I have so far is listed below.  

Im to find a persons first/last name.. the format isnt always the same, so I'm just throwing the most common ones in there.  The problem I am trying to solve on this, on the following string:
"bla bla blah, newline, newilne, name: bob jones whatever whatever junk hey ha newline"
The result is "name: bob jones"

Is there an easy way for me to just get "bob jones" (i.e. drop name|name:|full name|full name:|contact|contact name|contact:|contact name: or whatever was matched?)
Dim reg As New System.Text.RegularExpressions.Regex("(name|name:|full name|full name:|contact|contact name|contact:|contact name:)\s\w*\s\w*")
        Dim matches As System.Text.RegularExpressions.MatchCollection
        matches = reg.Matches(body.ToLower())
        If matches.Count > 0 Then
 
        End If

Open in new window

BobBarker_99Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
ddrudikConnect With a Mentor Commented:
(?<=name: )bob jones

Would match "name: bob jones" and return just "bob jones" in capture group 0.
0
 
BobBarker_99Author Commented:
great, i thought there must be something like that, but had no idea what it was.

Thanks
0
 
ddrudikCommented:
Thanks for the question and the points.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.