Add test for different RegExp flags.