I need a regular expression that will match any string containing at most 2 dashes and 2 dots. There does not HAVE to be a dash nor a dot, but if there is 3+ dashes or>
Use this: (?!^.*?([-.])(?:.*\1){2}.*$)^.*$
(?!^.*?([-.])(?:.*\1){2}.*$)^.*$