VBdotnet2005
asked on
find duplicate words
How can I find out if a string contains same words?
dim mystring as string = "Accountnumber, address, zipcode, accountnumber, phonenumber, address, workphone"
result would be Accountnumber and address
dim mystring as string = "Accountnumber, address, zipcode, accountnumber, phonenumber, address, workphone"
result would be Accountnumber and address
ASKER
Dim mystring As String = "Accountnumber, address, zipcode, accountnumber, phonenumber, address, workphone"
Dim matches As String = Regex.Matches(mystring.ToL ower(), "([a-z]+).*?\1") <<<<< error
For Each m As Match In matches
Console.WriteLine(m.Value)
Next
Dim matches As String = Regex.Matches(mystring.ToL
For Each m As Match In matches
Console.WriteLine(m.Value)
Next
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window