fixed portability issue with RegularExpression object