Added regex option to validate options
Land #3185, regex option validation