ParameterExtractor of cultureInfo issue (original) (raw)

There is a CultureInfo problem in the process of finding the "@blabla" parameters defined in the script text with regex.
For example
A parameter named "@testIId" cannot be found in script text when CulturerInfo is "tr-TR". The character "I" has always been a problem for this Culture :) RegexOptions.CultureInvariant can be added as a solution.

Old

private static readonly Regex ParameterExtractor = new Regex(@"@(? ([a-z]|) ([a-z]||\d)*)", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace);

New

private static readonly Regex ParameterExtractor = new Regex(@"@(? ([a-z]|) ([a-z]||\d)*)", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace | RegexOptions.CultureInvariant);