Using RegExp for matching; fix