This is a bug in ICU. For example, this function hangs for the same reason:
bool f() { UnicodeString p( "(2*){2,}?a2\\z" ); UErrorCode status = U_ZERO_ERROR; RegexMatcher m( p, 0, status ); assert( U_SUCCESS( status ) );
UnicodeString s( "2a3" ); m.reset( s ); return m.find() != 0; }
This is a bug in ICU. For example, this function hangs for the same reason:
bool f() {
UnicodeString p( "(2*){2,}?a2\\z" );
UErrorCode status = U_ZERO_ERROR;
RegexMatcher m( p, 0, status );
assert( U_SUCCESS( status ) );
UnicodeString s( "2a3" );
m.reset( s );
return m.find() != 0;
}