changed patters in regex from [A-Za-z] and [0-9] to \w and \d