Reg exp to match a string until a special character 'dot' (.) excludes spaces or tabs