make suitable for for RegExp constructor