I need a regular expression which validates
"Optional str1 as string = ''",
but also
"str2 as string"
and also
"str3 as boolean, Optional dtm as date = Now"
So when "Optional" is used there must be a "=" sign
But "Optional" is optional
This is what i have tried:
(Optional\s|)(.*)(\s=\s|)(.*)
and this is not right. It validates too much.
Any hints?