Fix regex error on strings containing \