fix pattern regex