I've never been able to construct a regular expression on my own, and now I have a simple application that needs one. How do I construct a simple regex that matches:
- A fixed string
- No whitespace / any whitespace
- The '=' char
- No whitespace / any whitespace
- The '(' char
Currently I'm using the following code to match whole words, but as you can see its quite limited in its functionality.
Regex.Matches(data, @"\b" + Regex.Escape(columnID + "=(") + @"\b");
Regex.Matches(data, @"\b" + Regex.Escape(columnID + "= (") + @"\b");
Regex.Matches(data, @"\b" + Regex.Escape(columnID + " =(") + @"\b");
Regex.Matches(data, @"\b" + Regex.Escape(columnID + " = (") + @"\b");