#JC-1986:Updated pattern. Allowed arbitrary number of sspaces