3631: eliminate dependency on NSRegularExpression