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

c - Calling a function within a loop -

vb.net - Unbound DataGridView add row with checkbox error -

How i fill combobox items in Radgridview manually using in vb.net -