I have a string that contains various symbols, but I need to get a 10-alphanumeric substring that is located between % and % – but there might be more than one combination of % and % in one string
Example: %bla1234bla%, or %12aa22bb33% etc. (I don’t need the %)
I tried this:
String resultString = Regex.Match(lnk, @"\[%\](.*?)\[%\]{10}").Value;
and it does not work
By looking positive lookahead and lookbehind, this will match the 10 alphanumeric characters between % chars, without actually matching the % chars.