I have a string like this:
String1=[q:6][ilvl:70](randomword)
and i need three patterns to retrieve the number 70 after the ilvl:, the number 6 after the q: and and one other pattern to retrieve all the ascii characters. I came up with these three patterns but i failed because they dont do excactly the three above.
string rules_1 = @"(?i)\[ilvl:([0-9]{1,2})\]";
string rules_2 = @"(?i)\[q:([0-9]{1,2})\]";
string rules_3 = @"(?i)\(([[:ascii:]+]+)\)";
The first one retrieves [ilvl:70] instead of 70 The second retrieves [q:6] instead of 6 and the third retrieves nothing instead of all ascii characters...
Any regular expression guru that can help me out here?!
Thank you in advance.