|
|
От: | ifle | |
| Дата: | 18.02.15 11:00 | ||
| Оценка: | |||
private static Regex _whereItemRegex = new Regex(@"
(?<exproperator>AND|OR)? # expression operator
(?:\s*\(*)\s* # whitespaces
(?<fieldName>\w+) # fieldname
\s*(?<operator>=|<>)\s* # operator
(?<quotedvalue> # quoted value
'(?<value>[^']*)' # string value
| (?<value>[+-]?(?:[0-9]*\.?[0-9]+|[0-9]+\.?[0-9]*)(?:[eE][+-]?[0-9]+)?) # number
| \#(?<value>[^#]+)\# # datetime value
)(?:\s*\)*\s*) # whitespaces
", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.IgnorePatternWhitespace);
|
|
От: |
DragonFire
|
|
| Дата: | 18.02.15 21:12 | ||
| Оценка: | |||
I>private static Regex _whereItemRegex = new Regex(@"
I> (?<exproperator>AND|OR)? # expression operator
I> (?:\s*\(*)\s* # whitespaces
I> (?<fieldName>\w+) # fieldname
I> \s*(?<operator>=|<>)\s* # operator
I> (?<quotedvalue> # quoted value
I> '(?<value>[^']*)' # string value
I> | (?<value>[+-]?(?:[0-9]*\.?[0-9]+|[0-9]+\.?[0-9]*)(?:[eE][+-]?[0-9]+)?) # number
I> | \#(?<value>[^#]+)\# # datetime value
I> )(?:\s*\)*\s*) # whitespaces
I> ", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.IgnorePatternWhitespace);
I>