Fix regex pattern (fix #784)