tactivos/jquery-sew — pull request #12 by jfelsinger (2013-09-07 04:48:12+00:00)
Title: Replace token value with actual token entered

It was observed that the token can contain regex string and it would be detected without problem. However, if one were to use any type of regex syntax in the token string it would replace the actual entered text for that token.

ex:
if the token was '[-=+]' and the user entered any of the values defined by the regex (+, =, or -) the list would come up, as expected, but when a value was chosen the token the the user entered would be replaced with '[-+=]'.

This change extracts the imputed token using the original regex, then it uses that instead.