I need to validate some commands with the format similar to this
"/a foo.bar /b bar.foo /c 01(.01)"
where the final (.01) is optional (brackets are there to mark the contents as optional). Any digits can be set instead of the 0's and 1's. Also the switches /a, /b, /c are fixed For the moment, I've developed this regular expression:
@"/a\s*([\w\W]*)\s*/b\s*([\w\W]*)\s*/c\s*[0-9,0-9,(.,0-9,0-9){0,1}]
but for some reason, if the command is for example
"/a foo.bar /b bar.foo /c 01.",
it still validates against the regex. Valid commands should end either with 2digits.2digits or simple 2digits.
Can someone help me to get this fixed?
Cheers,
Alex Barac