I am a regex idiot and never found a good tutorial (links welcome, as well as a pointer to an interactive VS2010 integrated editor).
I need to parse strings in the following form:
[a/b]:c/d
a, b: double with "." as possible separator. CAN be empty
c: double with "." as separator
d: integer, positive
I.e. valid strings are:
[/]:0.25/2
[-0.5/0.5]:0.05/2
[/0.1]:0.05/2
😉 Anyone can help?
Thanks
captures each number in its own group.
This assumes that it’s legal for your double values not to contain a decimal part. If it isn’t, you can use