I need a regex expression that performs a "contains" function on a input/type=hidden field's value. This hidden field stores unique values in a comma delimited string.
Here's a scenario.
The value: "mix" needs to be added to the hidden field. It will only be added if it does not exist as a comma delimited value.
With my limited knowlege of regex, I can't prevent the search from returning all ocurrences of the "mix" value. For example if: hiddenField.val = 'mixer, mixon, mixx', the regex always returns true, because the all three words contain the "mix" characters.
Thanks in advance for the help