set RegExp object flags