Made jquery event handler for regex check more element-specific.