Wildcard replace RegEx in C# -


i've searched , searched, seen bits of code looks solution, doesn't work. i'm not experienced in use of regular expressions , see i'm doing wrong here.

string line = input.replace("<td>", ";"); string withouttabs = regex.replace(line, "\t", ";"); string withouttd = regex.replace(withouttabs, ".*</td>", ";"); 

the code above trying replace of <td> </td> , tabs html table layout. doesn't work, doesn't remove tabs nor replace </td> tags. </td> tag attached text, this: text</td>

i want this: text;

could point out mistake, or regex wrong , need replace else?

i want replace <td> </td> , tabs ;

regex.replace(input, @"</?td>|\t", ";"); 

demo


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -