For example, I have a string like
"This is a <b> Sample </b> string with characters < 100"
My user will include html tags like <b>,<div> etc. They are allowed. I need to detect and identify the position of only the stand alone “<” and “>” symbols for some other validation. It is a c#.net project.
Any ideas will be highly appreciated. Thanks.
You can use regular expression:
This would search for a < without a letter or / efter it and a > without a letter before it. Should suffice in most cases.