fix regexp matching