I`m parsing SQL query with C# Regex.
I need also to make my pattern to understand ‘=’, for example:
string pattern = @’…something…(where)\s\w*\s*(order by)*…something else…’;
the following query should match my pattern:
select fieldslist from mytable where fieldvalue=someint order by specialfield
how can I change the interval of char (I mean ‘\w*’) to make pattern understand my SELECT correctly?
Use a character class instead of \w
(that is, from A to Z, from a to z from 0 to 9 plus _)
Just add any additional character you want: