Chaning the pattern matching to re