I'm using jQuery to add a pattern attribute to a text field based on a letter I select from an array. I'm trying to restrict the values that text field can accept with a regex, but it doesn't work properly.I'm using jQuery to add a pattern attribute to