txtInput.Text = "[)>RS06" + (char)29 + "11V62970814" + (char)29 + "P1234567890" + (char)29 + "16SZZ" + (char)29 + "1P0793" + (char)29 + "6P001" + (char)29 + "Q375RSEOT";
Hello,
I have a string like this. (to see above or below)
or like this
txtInput.Text = "[)>RS06" + (char)29 + "P1234567890" + (char)29 + "16SZZ" + (char)29 + "1P0793" + (char)29 + "6P001" + (char)29 + "Q375RSEOT";
More or less or different place. So I think the best is RegEx.
So I need all variables and values. (Prefix, Value)
get { return @"16S([-A-Z0-9]{1,2})"; } // with special character!
16S is prefix or 1P is prefix.
get { return @"1P([A-Z0-9]{0,4})"; } not work
1P can be 4 digits or only 2 or 3. But if I make a range is not work, no match, why?
- How I can define valid values A-Z, 0-9 and the count is from 0 to 4 ?
- How I can define valid values A-Z, 0-9, -, @ or # and the count is from 1 to 2 ? Specials values -, @ or #
Or do you see a better way for analysis this string?
My idea was.
Split first the whole string, then check each items with RegEx.
Thanks in advance for your help.
Best regards Markus