Merge r1873747 from trunk: factor out default regex flags Submitted by: covener Reviewed by: covener, minfrin, jorton