So, how the title says it. How do I use regex for extracting application parameters?
I tried: --.*
, but I would like it not to match unless it has any character (except whitespace) after it. So, this: --version hello
would match --version
, however -- hello
wouldn't match anything. (Note that there is a space between --
and hello
)
I wouldn't like to use any other library. (Infact I cant as I am using Flex lexer)
Any ideas?
Matthew