Author: carelesswhisper | Posted on: 11/27/2009 5:33:51 AM | Views : 316

I want to convert specified text to specified link

Example : 10 perfect Christmas presents for...laptop addicts
-> 10 perfect <a href="http://abc.com">Christmast</a> presents for ...<a href="123.com">laptop</a> addicts
Problem when search match with regex , distinguide between link and text

here my code:
int i= 0; protected void Page_Load(object sender, EventArgs e) { string words = "<a href=\"sdsdf.com\"> laptop </a> 10 perfect Christmas presents for...laptop addicts"; string pattern = @"(\s+)(\w+)(\s*)[^</a>](\s+)"; MatchEvaluator evaluator = new MatchEvaluator(WordScrambler); Response.Write("Original words:"+ "<br />"); Response.Write(words); Response.Write("<br />Scrambled words:<br />"); Respo ...

Go to the complete details ...