parauchf/jquery-tokeninput — comment on commit 9f516b722cf207e04d8555c2c713667dd88a9840
File: src/jquery.tokeninput.js line 699
By psiphiorg:

Within brackets, most otherwise special characters don't need to be escaped. Only the characters which are special to character ranges ([, ], -, \) and the character which would end the regular expression (/) need to be escaped, and if properly placed, you can avoid the need to escape some of the range specials. So instead of:

/[-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/

you could use:

/[-[\]\/{}()*+?.\\^$|]/