so i am trying to come up with a perfect regex for checking a set of predefined string separated by commas without any repeat. Currently i've been able to achive this
^((IN|THE|BUSH|COM|NET|ALL)\s*[,]{0,1}\s*)+$
its works fine for its purpose apart from the fact that its doesn't check for unique values
example is "IN, THE, COM" without quotes this is a correct format
but having this is incorrect
"IN, COM, THE, COM"
i need a regex that works with java for this same task