Hi,
I want to convert a link to a definite text by using regular expression.While binding datagrid,i have a function which convert (look: the text) to link.My Function is here.
Private Function Convertlook(ByVal str As String) As String
Dim look As String
Dim pattern As String = "\(look: ([a-z0-9$&.öışçğü\s]+)\)"
Dim regex As New Regex(pattern, RegexOptions.IgnoreCase)
Dim htmlanc As New System.Web.UI.HtmlControls.HtmlAnchor()
Dim postbackRef As String = Page.GetPostBackEventReference(htmlanc, "$1")
htmlanc.HRef = postbackRef
str = regex.Replace(str, "(look: <a href=""javascript:" & htmlanc.HRef & """><font color=""#CC0000"">$1</font></a> )")
look = str
Return look
end function
The problem is that i want to edit the text,how can i reverse it to (look: the text)?Should i use again regular expression and what can be right regular expression of it?