I have written a method that uses regex regexmatch
formatedPhone = CmpReplace(phone, "[ \\s\\t\\.\\-\\(\\)]+", "")
i have the method code here which is not working
[code]Shared Function CmpReplace(feedString as String, feedPattern as String, replacePattern As String) As String
Dim sPat as New RegEx
Dim sStr As RegExMatch
Dim sMat As RegExOptions
Dim rtnStr As String
sPat.SearchPattern = feedPattern
sPat.ReplacementPattern = replacePattern
sStr=sPat.search(feedString)
Return sStr.Replace
End Function[/code]
i want to return the replaced/updated string after the replace
how might i do that making an alteration to my code ?