i'm encountering an issue with storing values with RegEx when doing a C# quadratic equation solver. Basically, I want the user to input the equation himself, instead of the program asking for a, b, and c.
Here is what i have:
string regEx = @"(-?\d +)x\^ 2([+-]\d +)x([+-]\d +)";
Match match = Regex.Match(regEx);
The program is done, except for inputting the values. I get this error:
An object reference is required for the non-static field, method, or property 'Regex.Match(string)'
Any ideas as to what I have to do to store the values? I would like to preferably store them in a double array.