[Solved] Regular expressions : how to find [closed]
The regex itself, while ugly and inefficient, should work. You do need to assign the string you’re adding into the regex before building the regex, though. While we’re at it, let’s clean it up: string tmprect = “gg_rct_MyReg1″; Regex regexObj = new Regex(@”^\s*set\s+” + tmprect + @”\s*=\s*Rect\s*\(\s*([^,\s]*)\s*,\s*([^,\s]*)\s*,\s*([^,\s]*)\s*,\s*([^)\s]*)\s*\).*$”); ([^,\s]*) matches any number of characters except commas … Read more