Can anyone help me make a regex or give me a good solution that can split/check the following string:
“<2342Flsdn3Z><9124Fsflj20>”
Everything starts with a “<” and the 6 caracter is a “F” and the string ends with a “>”
Is it possible to make a Regex that can find “strings” like this?
How about this:
<.{4}F[^>]+>It matches the opening
<, followed by any 4 chars, F, then anything till the closing>(by matching anything that is not a>).EDIT: part of making a good regex is clearly specifying the pattern you want to match. For example, the way you worded the question leaves certain details out. I responded with my pattern to match any character as long as F was where you specified.
For a better regex you could’ve told us a number of things:
\d{4}or[0-9]{4}[\dA-Z]{6}RegexOptions.IgnoreCase(.NET) or use[a-zA-Z]