RegexOptions options = RegexOptions.IgnoreCase; Regex regex = new Regex(@"^(?[a-z]+)#(?[a-z_0-9]+)( (?@[a-z_0-9]+)=(?[a-z_0-9']+))?", options); Match match = regex.Match(sprocCall); if (match.Groups.Count == 6) { // we always expect six groups // if not the string format was not correct string database = match.Groups["database"].Value; string sprocName = match.Groups["sproc"].Value; string parameterName = match.Groups["parametername"].Value.Trim(); string parameterValue = match.Groups["parametervalue"].Value.Trim(); // use the components to make a database call }
Remember Me
a@href@title, b