Fixed 'unexpected end of pattern'

Fixed 'unexpected end of pattern'