diff --git a/common/deftype/deftype.cpp b/common/deftype/deftype.cpp index 0053d77a052..7a205e95676 100644 --- a/common/deftype/deftype.cpp +++ b/common/deftype/deftype.cpp @@ -2135,6 +2135,11 @@ bool isPatternType(ITypeInfo * type) } } +bool isUTF8Type(ITypeInfo * type) +{ + return (type->getTypeCode() == type_utf8); +} + bool isUnicodeType(ITypeInfo * type) { switch(type->getTypeCode()) diff --git a/common/deftype/deftype.hpp b/common/deftype/deftype.hpp index b180516eea3..cc92ec38bea 100644 --- a/common/deftype/deftype.hpp +++ b/common/deftype/deftype.hpp @@ -245,6 +245,7 @@ extern DEFTYPE_API bool isSimpleStringType(ITypeInfo * type); extern DEFTYPE_API bool isSimpleIntegralType(ITypeInfo * type); extern DEFTYPE_API bool isIntegralType(ITypeInfo * type); extern DEFTYPE_API bool isPatternType(ITypeInfo * type); +extern DEFTYPE_API bool isUTF8Type(ITypeInfo * type); extern DEFTYPE_API bool isUnicodeType(ITypeInfo * type); extern DEFTYPE_API bool isLittleEndian(ITypeInfo * type); extern DEFTYPE_API bool isDatasetType(ITypeInfo * type); diff --git a/ecl/hql/hqlfold.cpp b/ecl/hql/hqlfold.cpp index 36489b53100..8e20d7442bb 100644 --- a/ecl/hql/hqlfold.cpp +++ b/ecl/hql/hqlfold.cpp @@ -2700,7 +2700,31 @@ IHqlExpression * foldConstantOperator(IHqlExpression * expr, unsigned foldOption if (t0 && t1 && (!c2 || t2)) { IValue * result; - if(isUnicodeType(t0->queryType())) + if (isUTF8Type(t0->queryType())) + { + StringBuffer pattern, search; + t0->getUTF8Value(pattern); + t1->getUTF8Value(search); + ICompiledStrRegExpr * compiled = rtlCreateCompiledU8StrRegExpr(pattern, !expr->hasAttribute(noCaseAtom)); + IStrRegExprFindInstance * match = compiled->find(search, 0, search.length(), false); + ITypeInfo * type = expr->queryType(); + if(type->getTypeCode() == type_boolean) + { + result = createBoolValue(match->found()); + } + else + { + assertex(c2 && t2); + size32_t len; + char * data; + match->getMatchX(len, data, (unsigned)t2->getIntValue()); + result = type->castFrom(len, data); + rtlFree(data); + } + rtlDestroyU8StrRegExprFindInstance(match); + rtlDestroyCompiledU8StrRegExpr(compiled); + } + else if(isUnicodeType(t0->queryType())) { unsigned plen = t0->queryType()->getStringLen(); unsigned slen = t1->queryType()->getStringLen(); @@ -2767,7 +2791,16 @@ IHqlExpression * foldConstantOperator(IHqlExpression * expr, unsigned foldOption size32_t resultBytes; rtlDataAttr matchResults; - if(isUnicodeType(v0->queryType())) + if (isUTF8Type(v0->queryType())) + { + StringBuffer pattern, search; + v0->getUTF8Value(pattern); + v1->getUTF8Value(search); + ICompiledStrRegExpr * compiled = rtlCreateCompiledU8StrRegExpr(pattern, !expr->hasAttribute(noCaseAtom)); + compiled->getMatchSet(isAllResult, resultBytes, matchResults.refdata(), search.length(), search.str()); + rtlDestroyCompiledU8StrRegExpr(compiled); + } + else if(isUnicodeType(v0->queryType())) { size32_t plen = v0->queryType()->getStringLen(); OwnedMalloc pattern (plen+1); @@ -2800,7 +2833,21 @@ IHqlExpression * foldConstantOperator(IHqlExpression * expr, unsigned foldOption if (t0 && t1 && t2) { IValue * result; - if(isUnicodeType(t0->queryType())) + if (isUTF8Type(t0->queryType())) + { + StringBuffer pattern, search, replace; + t0->getUTF8Value(pattern); + t1->getUTF8Value(search); + t2->getUTF8Value(replace); + size32_t outlen; + char * out; + ICompiledStrRegExpr * compiled = rtlCreateCompiledU8StrRegExpr(pattern, !expr->hasAttribute(noCaseAtom)); + compiled->replace(outlen, out, search.length(), search.str(), replace.length(), replace.str()); + result = createUtf8Value(outlen, out, makeUtf8Type(outlen, NULL)); + rtlFree(out); + rtlDestroyCompiledU8StrRegExpr(compiled); + } + else if(isUnicodeType(t0->queryType())) { unsigned plen = t0->queryType()->getStringLen(); unsigned slen = t1->queryType()->getStringLen(); diff --git a/ecl/hql/hqlutil.cpp b/ecl/hql/hqlutil.cpp index e64d76d04fb..c33aad2ea06 100644 --- a/ecl/hql/hqlutil.cpp +++ b/ecl/hql/hqlutil.cpp @@ -10709,7 +10709,14 @@ IException * checkRegexSyntax(IHqlExpression * expr) { try { - if (isUnicodeType(expr->queryType())) + if (isUTF8Type(expr->queryType())) + { + Owned unknownVarUTF8Type = makeUtf8Type(UNKNOWN_LENGTH, nullptr); + Owned castValue = value->castTo(unknownVarUTF8Type); + ICompiledStrRegExpr * compiled = rtlCreateCompiledU8StrRegExpr((const char *)castValue->queryValue(), false); + rtlDestroyCompiledU8StrRegExpr(compiled); + } + else if (isUnicodeType(expr->queryType())) { Owned unknownVarUnicodeType = makeVarUnicodeType(UNKNOWN_LENGTH, nullptr); Owned castValue = value->castTo(unknownVarUnicodeType); diff --git a/ecl/hqlcpp/hqlcatom.cpp b/ecl/hqlcpp/hqlcatom.cpp index 7281cc68287..12c1995114d 100644 --- a/ecl/hqlcpp/hqlcatom.cpp +++ b/ecl/hqlcpp/hqlcatom.cpp @@ -528,16 +528,22 @@ IIdAtom * regexFindXId; IIdAtom * regexGetFindStrId; IIdAtom * regexNewSetStrPatternId; IIdAtom * regexNewSetUStrPatternId; +IIdAtom * regexNewSetU8StrPatternId; IIdAtom * regexNewStrFindId; IIdAtom * regexNewStrFoundId; IIdAtom * regexNewStrFoundXId; IIdAtom * regexNewStrReplaceXId; IIdAtom * regexNewUStrFindId; +IIdAtom * regexNewU8StrFindId; IIdAtom * regexNewUStrFoundId; +IIdAtom * regexNewU8StrFoundId; IIdAtom * regexNewUStrFoundXId; +IIdAtom * regexNewU8StrFoundXId; IIdAtom * regexNewUStrReplaceXId; +IIdAtom * regexNewU8StrReplaceXId; IIdAtom * regexMatchSetId; IIdAtom * regexUStrMatchSetId; +IIdAtom * regexU8StrMatchSetId; IIdAtom * regexReplaceXId; IIdAtom * registerTimerId; IIdAtom * releaseRowId; @@ -1207,16 +1213,22 @@ MODULE_INIT(INIT_PRIORITY_HQLATOM-1) MAKEID(regexGetFindStr); MAKEID(regexNewSetStrPattern); MAKEID(regexNewSetUStrPattern); + MAKEID(regexNewSetU8StrPattern); MAKEID(regexNewStrFind); MAKEID(regexNewStrFound); MAKEID(regexNewStrFoundX); MAKEID(regexNewStrReplaceX); MAKEID(regexNewUStrFind); + MAKEID(regexNewU8StrFind); MAKEID(regexNewUStrFound); + MAKEID(regexNewU8StrFound); MAKEID(regexNewUStrFoundX); + MAKEID(regexNewU8StrFoundX); MAKEID(regexNewUStrReplaceX); + MAKEID(regexNewU8StrReplaceX); MAKEID(regexMatchSet); MAKEID(regexUStrMatchSet); + MAKEID(regexU8StrMatchSet); MAKEID(regexReplaceX); MAKEID(registerTimer); MAKEID(releaseRow); diff --git a/ecl/hqlcpp/hqlcatom.hpp b/ecl/hqlcpp/hqlcatom.hpp index d0087945299..d2f4aef46ba 100644 --- a/ecl/hqlcpp/hqlcatom.hpp +++ b/ecl/hqlcpp/hqlcatom.hpp @@ -526,16 +526,22 @@ extern IIdAtom * regexFindXId; extern IIdAtom * regexGetFindStrId; extern IIdAtom * regexNewSetStrPatternId; extern IIdAtom * regexNewSetUStrPatternId; +extern IIdAtom * regexNewSetU8StrPatternId; extern IIdAtom * regexNewStrFindId; extern IIdAtom * regexNewStrFoundId; extern IIdAtom * regexNewStrFoundXId; extern IIdAtom * regexNewStrReplaceXId; extern IIdAtom * regexNewUStrFindId; +extern IIdAtom * regexNewU8StrFindId; extern IIdAtom * regexNewUStrFoundId; +extern IIdAtom * regexNewU8StrFoundId; extern IIdAtom * regexNewUStrFoundXId; +extern IIdAtom * regexNewU8StrFoundXId; extern IIdAtom * regexNewUStrReplaceXId; +extern IIdAtom * regexNewU8StrReplaceXId; extern IIdAtom * regexMatchSetId; extern IIdAtom * regexUStrMatchSetId; +extern IIdAtom * regexU8StrMatchSetId; extern IIdAtom * regexReplaceXId; extern IIdAtom * registerTimerId; extern IIdAtom * releaseRowId; diff --git a/ecl/hqlcpp/hqlcpp.ipp b/ecl/hqlcpp/hqlcpp.ipp index 3ef357241df..16ef89f64e3 100644 --- a/ecl/hqlcpp/hqlcpp.ipp +++ b/ecl/hqlcpp/hqlcpp.ipp @@ -1739,7 +1739,7 @@ public: void doBuildNewRegexFindReplace(BuildCtx & ctx, const CHqlBoundTarget * target, IHqlExpression * expr, CHqlBoundExpr * bound); - IHqlExpression * doBuildRegexCompileInstance(BuildCtx & ctx, IHqlExpression * pattern, bool unicode, bool caseSensitive); + IHqlExpression * doBuildRegexCompileInstance(BuildCtx & ctx, IHqlExpression * pattern, ITypeInfo * stringType, bool caseSensitive); IHqlExpression * doBuildRegexFindInstance(BuildCtx & ctx, IHqlExpression * compiled, IHqlExpression * search, bool cloneSearch); IHqlExpression * doCreateGraphLookup(BuildCtx & declarectx, BuildCtx & resolvectx, unique_id_t id, const char * activity, bool isChild); diff --git a/ecl/hqlcpp/hqlcppsys.ecl b/ecl/hqlcpp/hqlcppsys.ecl index 21baf798363..ea4ca97de23 100644 --- a/ecl/hqlcpp/hqlcppsys.ecl +++ b/ecl/hqlcpp/hqlcppsys.ecl @@ -567,6 +567,13 @@ const char * cppSystemText[] = { " unicode regexNewUStrReplaceX(const unicode _search, const unicode _replace) : method,pure,entrypoint='replace',time('REGEXREPLACE');" " set of unicode regexUStrMatchSet(const unicode _search) : method,pure,entrypoint='getMatchSet',time('REGEXFINDSET');" + " regexNewSetU8StrPattern(const utf8 _pattern, boolean isCaseSensitive) : omethod,entrypoint='setPattern',time('CompileUTF8Regex');" + " regexNewU8StrFind(boolean _compiled, const utf8 _search, boolean _cloneSearch) : omethod,entrypoint='find',time('REGEXFIND');" + " boolean regexNewU8StrFound() : method,pure,entrypoint='found';" + " unicode regexNewU8StrFoundX(unsigned4 idx) : method,pure,entrypoint='getMatchX';" + " unicode regexNewU8StrReplaceX(const utf8 _search, const utf8 _replace) : method,pure,entrypoint='replace',time('REGEXREPLACE');" + " set of utf8 regexU8StrMatchSet(const utf8 _search) : method,pure,entrypoint='getMatchSet',time('REGEXFINDSET');" + //clibrary functions that are called from the code generation " free(noconst data1 src) : eclrtl,library='eclrtl',entrypoint='rtlFree';", " integer4 memcmp(const data1 target, const data1 src, unsigned4 len) : sys,pure,entrypoint='memcmp';", diff --git a/ecl/hqlcpp/hqlhtcpp.cpp b/ecl/hqlcpp/hqlhtcpp.cpp index 56139d12077..1c0a55836be 100644 --- a/ecl/hqlcpp/hqlhtcpp.cpp +++ b/ecl/hqlcpp/hqlhtcpp.cpp @@ -18470,9 +18470,9 @@ ABoundActivity * HqlCppTranslator::doBuildActivityHTTP(BuildCtx & ctx, IHqlExpre //--------------------------------------------------------------------------- -IHqlExpression * HqlCppTranslator::doBuildRegexCompileInstance(BuildCtx & ctx, IHqlExpression * pattern, bool isUnicode, bool isCaseSensitive) +IHqlExpression * HqlCppTranslator::doBuildRegexCompileInstance(BuildCtx & ctx, IHqlExpression * pattern, ITypeInfo * stringType, bool isCaseSensitive) { - OwnedHqlExpr searchKey = createAttribute(_regexInstance_Atom, LINK(pattern), createConstant(isUnicode), createConstant(isCaseSensitive)); + OwnedHqlExpr searchKey = createAttribute(_regexInstance_Atom, LINK(pattern), createConstant(stringType->queryTypeName()), createConstant(isCaseSensitive)); HqlExprAssociation * match = ctx.queryMatchExpr(searchKey); if (match) return match->queryExpr(); @@ -18518,12 +18518,20 @@ IHqlExpression * HqlCppTranslator::doBuildRegexCompileInstance(BuildCtx & ctx, I StringBuffer tempName; getUniqueId(tempName.append("regex")); - ITypeInfo * type = makeClassType(isUnicode ? "rtlCompiledUStrRegex" : "rtlCompiledStrRegex"); + ITypeInfo * type = nullptr; + if (isUTF8Type(stringType)) + type = makeClassType("rtlCompiledU8StrRegex"); + else if (isUnicodeType(stringType)) + type = makeClassType("rtlCompiledUStrRegex"); + else + type = makeClassType("rtlCompiledStrRegex"); OwnedHqlExpr regexInstance = createVariable(tempName.str(), type); if (!initCtx) { OwnedITypeInfo patternType; - if (isUnicode) + if (isUTF8Type(stringType)) + patternType.setown(makeUtf8Type(UNKNOWN_LENGTH, nullptr)); + else if (isUnicodeType(stringType)) patternType.setown(makeVarUnicodeType(UNKNOWN_LENGTH, nullptr)); else patternType.set(unknownVarStringType); @@ -18551,7 +18559,13 @@ IHqlExpression * HqlCppTranslator::doBuildRegexCompileInstance(BuildCtx & ctx, I args.append(*LINK(regexInstance)); args.append(*LINK(pattern)); args.append(*createConstant(isCaseSensitive)); - IIdAtom * func = isUnicode ? regexNewSetUStrPatternId : regexNewSetStrPatternId; + IIdAtom * func = nullptr; + if (isUTF8Type(stringType)) + func = regexNewSetU8StrPatternId; + else if (isUnicodeType(stringType)) + func = regexNewSetUStrPatternId; + else + func = regexNewSetStrPatternId; buildFunctionCall(*initCtx, func, args); } declareCtx->associateExpr(searchKey, regexInstance); @@ -18566,10 +18580,16 @@ IHqlExpression * HqlCppTranslator::doBuildRegexFindInstance(BuildCtx & ctx, IHql if (match) return match->queryExpr(); - bool isUnicode = isUnicodeType(search->queryType()); + ITypeInfo * searchStringType = search->queryType(); StringBuffer tempName; getUniqueId(tempName.append("fi")); - ITypeInfo * type = makeClassType(isUnicode ? "rtlUStrRegexFindInstance" : "rtlStrRegexFindInstance"); + ITypeInfo * type = nullptr; + if (isUTF8Type(searchStringType)) + type = makeClassType("rtlU8StrRegexFindInstance"); + else if (isUnicodeType(searchStringType)) + type = makeClassType("rtlUStrRegexFindInstance"); + else + type = makeClassType("rtlStrRegexFindInstance"); OwnedHqlExpr regexInstance = createVariable(tempName.str(), type); ctx.addDeclare(regexInstance); @@ -18580,9 +18600,15 @@ IHqlExpression * HqlCppTranslator::doBuildRegexFindInstance(BuildCtx & ctx, IHql args.append(*LINK(regexInstance)); args.append(*createTranslated(castCompiled)); args.append(*LINK(search)); - if (!isUnicode) + if (!isUnicodeType(searchStringType)) args.append(*createConstant(cloneSearch)); - IIdAtom * func = isUnicode ? regexNewUStrFindId : regexNewStrFindId; + IIdAtom * func = nullptr; + if (isUTF8Type(searchStringType)) + func = regexNewU8StrFindId; + else if (isUnicodeType(searchStringType)) + func = regexNewUStrFindId; + else + func = regexNewStrFindId; buildFunctionCall(ctx, func, args); ctx.associateExpr(searchKey, regexInstance); @@ -18603,8 +18629,8 @@ void HqlCppTranslator::doBuildNewRegexFindReplace(BuildCtx & ctx, const CHqlBoun IHqlExpression * pattern = expr->queryChild(0); IHqlExpression * search = expr->queryChild(1); - bool isUnicode = isUnicodeType(search->queryType()); - IHqlExpression * compiled = doBuildRegexCompileInstance(ctx, pattern, isUnicode, !expr->hasAttribute(noCaseAtom)); + ITypeInfo * searchStringType = search->queryType(); + IHqlExpression * compiled = doBuildRegexCompileInstance(ctx, pattern, searchStringType, !expr->hasAttribute(noCaseAtom)); // Because the search instance is created locally, the search parameter is always going to be valid // as long as the find instance. Only exception could be if call created a temporary class instance. @@ -18614,7 +18640,13 @@ void HqlCppTranslator::doBuildNewRegexFindReplace(BuildCtx & ctx, const CHqlBoun args.append(*LINK(compiled)); args.append(*LINK(search)); args.append(*LINK(expr->queryChild(2))); - IIdAtom * func = isUnicode ? regexNewUStrReplaceXId : regexNewStrReplaceXId; + IIdAtom * func = nullptr; + if (isUTF8Type(searchStringType)) + func = regexNewU8StrReplaceXId; + else if (isUnicodeType(searchStringType)) + func = regexNewUStrReplaceXId; + else + func = regexNewStrReplaceXId; OwnedHqlExpr call = bindFunctionCall(func, args); //Need to associate??? buildExprOrAssign(ctx, target, call, bound); @@ -18627,7 +18659,13 @@ void HqlCppTranslator::doBuildNewRegexFindReplace(BuildCtx & ctx, const CHqlBoun { HqlExprArray args; args.append(*LINK(findInstance)); - IIdAtom * func= isUnicode ? regexNewUStrFoundId : regexNewStrFoundId; + IIdAtom * func = nullptr; + if (isUTF8Type(searchStringType)) + func = regexNewU8StrFoundId; + else if (isUnicodeType(searchStringType)) + func = regexNewUStrFoundId; + else + func = regexNewStrFoundId; OwnedHqlExpr call = bindFunctionCall(func, args); buildExprOrAssign(ctx, target, call, bound); } @@ -18636,7 +18674,13 @@ void HqlCppTranslator::doBuildNewRegexFindReplace(BuildCtx & ctx, const CHqlBoun HqlExprArray args; args.append(*LINK(findInstance)); args.append(*LINK(expr->queryChild(2))); - IIdAtom * func= isUnicode ? regexNewUStrFoundXId : regexNewStrFoundXId; + IIdAtom * func = nullptr; + if (isUTF8Type(searchStringType)) + func = regexNewU8StrFoundXId; + else if (isUnicodeType(searchStringType)) + func = regexNewUStrFoundXId; + else + func = regexNewStrFoundXId; OwnedHqlExpr call = bindFunctionCall(func, args); buildExprOrAssign(ctx, target, call, bound); } @@ -18665,13 +18709,20 @@ void HqlCppTranslator::doBuildExprRegexFindSet(BuildCtx & ctx, IHqlExpression * IHqlExpression * pattern = expr->queryChild(0); IHqlExpression * search = expr->queryChild(1); - bool isUnicode = isUnicodeType(search->queryType()); - IHqlExpression * compiled = doBuildRegexCompileInstance(ctx, pattern, isUnicode, !expr->hasAttribute(noCaseAtom)); + ITypeInfo * searchStringType = search->queryType(); + IHqlExpression * compiled = doBuildRegexCompileInstance(ctx, pattern, searchStringType, !expr->hasAttribute(noCaseAtom)); HqlExprArray args; args.append(*LINK(compiled)); args.append(*LINK(search)); - IIdAtom * func = isUnicode ? regexUStrMatchSetId : regexMatchSetId; + IIdAtom * func = nullptr; + if (isUTF8Type(searchStringType)) + func = regexU8StrMatchSetId; + else if (isUnicodeType(searchStringType)) + func = regexUStrMatchSetId; + else + func = regexMatchSetId; + OwnedHqlExpr call = bindFunctionCall(func, args); buildExprOrAssign(ctx, NULL, call, &bound); //REGEXFINDSET() can never return ALL - so explicitly clear it in the result. diff --git a/rtl/eclrtl/eclregex.cpp b/rtl/eclrtl/eclregex.cpp index 08aa457a94b..2ad27940cdf 100644 --- a/rtl/eclrtl/eclregex.cpp +++ b/rtl/eclrtl/eclregex.cpp @@ -61,7 +61,9 @@ static void pcre2Free(void * block, void * /*userData*/) /// @param msgPrefix Prefix for error message; can be an empty string; /// include a trailing space if a non-empty message is passed /// @param regex OPTIONAL; regex pattern that was in play when error occurred -static void failWithPCRE2Error(int errCode, const char * msgPrefix, const char * regex = nullptr) +/// @param errOffset OPTIONAL; offset in regex pattern where error occurred; +/// ignored if regex is null +static void failWithPCRE2Error(int errCode, const char * msgPrefix, const char * regex = nullptr, int errOffset = -1) { const int errBuffSize = 120; char errBuff[errBuffSize]; @@ -79,8 +81,14 @@ static void failWithPCRE2Error(int errCode, const char * msgPrefix, const char * } if (regex && regex[0]) { - msg += " (regex: "; + msg += " (regex: '"; msg += regex; + msg += "'"; + if (errOffset >= 0) + { + msg += " at offset "; + msg += std::to_string(errOffset); + } msg += ")"; } rtlFail(0, msg.c_str()); @@ -185,17 +193,31 @@ class CCompiledStrRegExpr : implements ICompiledStrRegExpr pcre2_code_8 * compiledRegex = nullptr; public: - CCompiledStrRegExpr(const char * _regex, bool _isCaseSensitive = false) + CCompiledStrRegExpr(const char * _regex, bool _isCaseSensitive, bool _enableUTF8) { int errNum = 0; PCRE2_SIZE errOffset; - uint32_t options = (_isCaseSensitive ? 0 : PCRE2_CASELESS); + uint32_t options = ((_isCaseSensitive ? 0 : PCRE2_CASELESS) | (_enableUTF8 ? PCRE2_UTF : 0)); compiledRegex = pcre2_compile_8((PCRE2_SPTR8)_regex, PCRE2_ZERO_TERMINATED, options, &errNum, &errOffset, pcre2CompileContext8); if (compiledRegex == nullptr) { - failWithPCRE2Error(errNum, "Error in regex pattern: ", _regex); + failWithPCRE2Error(errNum, "Error in regex pattern: ", _regex, errOffset); + } + } + + CCompiledStrRegExpr(int _regexLength, const char * _regex, bool _isCaseSensitive, bool _enableUTF8) + { + int errNum = 0; + PCRE2_SIZE errOffset; + uint32_t options = ((_isCaseSensitive ? 0 : PCRE2_CASELESS) | (_enableUTF8 ? PCRE2_UTF : 0)); + + compiledRegex = pcre2_compile_8((PCRE2_SPTR8)_regex, _regexLength, options, &errNum, &errOffset, pcre2CompileContext8); + + if (compiledRegex == nullptr) + { + failWithPCRE2Error(errNum, "Error in regex pattern: ", _regex, errOffset); } } @@ -318,7 +340,13 @@ class CCompiledStrRegExpr : implements ICompiledStrRegExpr ECLRTL_API ICompiledStrRegExpr * rtlCreateCompiledStrRegExpr(const char * regExpr, bool isCaseSensitive) { - CCompiledStrRegExpr * expr = new CCompiledStrRegExpr(regExpr, isCaseSensitive); + CCompiledStrRegExpr * expr = new CCompiledStrRegExpr(regExpr, isCaseSensitive, false); + return expr; +} + +ECLRTL_API ICompiledStrRegExpr * rtlCreateCompiledStrRegExpr(int regExprLength, const char * regExpr, bool isCaseSensitive) +{ + CCompiledStrRegExpr * expr = new CCompiledStrRegExpr(regExprLength, regExpr, isCaseSensitive, false); return expr; } @@ -336,6 +364,32 @@ ECLRTL_API void rtlDestroyStrRegExprFindInstance(IStrRegExprFindInstance * findI //--------------------------------------------------------------------------- +ECLRTL_API ICompiledStrRegExpr * rtlCreateCompiledU8StrRegExpr(const char * regExpr, bool isCaseSensitive) +{ + CCompiledStrRegExpr * expr = new CCompiledStrRegExpr(regExpr, isCaseSensitive, true); + return expr; +} + +ECLRTL_API ICompiledStrRegExpr * rtlCreateCompiledU8StrRegExpr(int regExprLength, const char * regExpr, bool isCaseSensitive) +{ + CCompiledStrRegExpr * expr = new CCompiledStrRegExpr(regExprLength, regExpr, isCaseSensitive, true); + return expr; +} + +ECLRTL_API void rtlDestroyCompiledU8StrRegExpr(ICompiledStrRegExpr * compiledExpr) +{ + if (compiledExpr) + delete (CCompiledStrRegExpr*)compiledExpr; +} + +ECLRTL_API void rtlDestroyU8StrRegExprFindInstance(IStrRegExprFindInstance * findInst) +{ + if (findInst) + delete (CStrRegExprFindInstance*)findInst; +} + +//--------------------------------------------------------------------------- + // RegEx Compiler for unicode strings #ifdef _USE_ICU diff --git a/rtl/eclrtl/eclrtl.hpp b/rtl/eclrtl/eclrtl.hpp index 8e43c30567d..1fb59347e00 100644 --- a/rtl/eclrtl/eclrtl.hpp +++ b/rtl/eclrtl/eclrtl.hpp @@ -77,7 +77,7 @@ enum DBZaction { DBZnone, DBZzero, DBZnan, DBZfail }; // Different actions on di //----------------------------------------------------------------------------- -// RegEx Compiler for ansii strings (uses PCRE2) +// RegEx Compiler for ansii and utf-8 strings interface IStrRegExprFindInstance { virtual bool found() const = 0; @@ -704,9 +704,15 @@ ECLRTL_API void rtlUtf8SpaceFill(unsigned tlne, char * tgt, unsigned idx); ECLRTL_API ICompiledStrRegExpr * rtlCreateCompiledStrRegExpr(const char * regExpr, bool isCaseSensitive); +ECLRTL_API ICompiledStrRegExpr * rtlCreateCompiledStrRegExpr(int regExprLength, const char * regExpr, bool isCaseSensitive); ECLRTL_API void rtlDestroyCompiledStrRegExpr(ICompiledStrRegExpr * compiled); ECLRTL_API void rtlDestroyStrRegExprFindInstance(IStrRegExprFindInstance * compiled); +ECLRTL_API ICompiledStrRegExpr * rtlCreateCompiledU8StrRegExpr(const char * regExpr, bool isCaseSensitive); +ECLRTL_API ICompiledStrRegExpr * rtlCreateCompiledU8StrRegExpr(int regExprLength, const char * regExpr, bool isCaseSensitive); +ECLRTL_API void rtlDestroyCompiledU8StrRegExpr(ICompiledStrRegExpr * compiled); +ECLRTL_API void rtlDestroyU8StrRegExprFindInstance(IStrRegExprFindInstance * compiled); + ECLRTL_API ICompiledUStrRegExpr * rtlCreateCompiledUStrRegExpr(const UChar * regExpr, bool isCaseSensitive); ECLRTL_API void rtlDestroyCompiledUStrRegExpr(ICompiledUStrRegExpr * compiled); ECLRTL_API void rtlDestroyUStrRegExprFindInstance(IUStrRegExprFindInstance * compiled); diff --git a/rtl/eclrtl/eclrtl_imp.hpp b/rtl/eclrtl/eclrtl_imp.hpp index f0b1ee4b0d8..1c56d0b4be3 100644 --- a/rtl/eclrtl/eclrtl_imp.hpp +++ b/rtl/eclrtl/eclrtl_imp.hpp @@ -121,6 +121,7 @@ class ECLRTL_API rtlCompiledStrRegex inline ~rtlCompiledStrRegex() { rtlDestroyCompiledStrRegExpr(regex); } inline ICompiledStrRegExpr * operator -> () const { return regex; } + inline void setPattern(const char * pattern, bool isCaseSensitive) { ICompiledStrRegExpr * compiled = rtlCreateCompiledStrRegExpr(pattern, isCaseSensitive); @@ -129,6 +130,14 @@ class ECLRTL_API rtlCompiledStrRegex regex = compiled; } + inline void setPattern(unsigned int patternLen, const char * pattern, bool isCaseSensitive) + { + ICompiledStrRegExpr * compiled = rtlCreateCompiledStrRegExpr(patternLen, pattern, isCaseSensitive); + if (regex) + rtlDestroyCompiledStrRegExpr(regex); + regex = compiled; + } + private: ICompiledStrRegExpr * regex; }; @@ -163,6 +172,7 @@ class ECLRTL_API rtlCompiledUStrRegex inline ~rtlCompiledUStrRegex() { rtlDestroyCompiledUStrRegExpr(regex); } inline ICompiledUStrRegExpr * operator -> () const { return regex; } + inline void setPattern(const UChar * pattern, bool isCaseSensitive) { ICompiledUStrRegExpr * compiled = rtlCreateCompiledUStrRegExpr(pattern, isCaseSensitive); @@ -175,6 +185,38 @@ class ECLRTL_API rtlCompiledUStrRegex ICompiledUStrRegExpr * regex; }; +class ECLRTL_API rtlCompiledU8StrRegex +{ +public: + inline rtlCompiledU8StrRegex() { regex = 0; } + inline rtlCompiledU8StrRegex(const char * pattern, bool isCaseSensitive) + { + regex = rtlCreateCompiledU8StrRegExpr(pattern, isCaseSensitive); + } + inline ~rtlCompiledU8StrRegex() { rtlDestroyCompiledU8StrRegExpr(regex); } + + inline ICompiledStrRegExpr * operator -> () const { return regex; } + + inline void setPattern(const char * pattern, bool isCaseSensitive) + { + ICompiledStrRegExpr * compiled = rtlCreateCompiledU8StrRegExpr(pattern, isCaseSensitive); + if (regex) + rtlDestroyCompiledU8StrRegExpr(regex); + regex = compiled; + } + + inline void setPattern(unsigned int patternLen, const char * pattern, bool isCaseSensitive) + { + ICompiledStrRegExpr * compiled = rtlCreateCompiledU8StrRegExpr(patternLen, pattern, isCaseSensitive); + if (regex) + rtlDestroyCompiledU8StrRegExpr(regex); + regex = compiled; + } + +private: + ICompiledStrRegExpr * regex; +}; + class ECLRTL_API rtlUStrRegexFindInstance { public: @@ -194,6 +236,25 @@ class ECLRTL_API rtlUStrRegexFindInstance IUStrRegExprFindInstance * instance; }; +class ECLRTL_API rtlU8StrRegexFindInstance +{ +public: + inline rtlU8StrRegexFindInstance() { instance = 0; } + inline ~rtlU8StrRegexFindInstance() { rtlDestroyU8StrRegExprFindInstance(instance); } + inline IStrRegExprFindInstance * operator -> () const { return instance; } + + void find(const rtlCompiledU8StrRegex & regex, size32_t len, const char * str, bool needToKeepSearchString) + { + IStrRegExprFindInstance * search = regex->find(str, 0, len, needToKeepSearchString); + if (instance) + rtlDestroyU8StrRegExprFindInstance(instance); + instance = search; + } + +private: + IStrRegExprFindInstance * instance; +}; + class ECLRTL_API RtlCInterface { public: diff --git a/testing/regress/ecl/key/regex_patterns_string_1.xml b/testing/regress/ecl/key/regex_patterns_string_1.xml new file mode 100644 index 00000000000..1ef7377e136 --- /dev/null +++ b/testing/regress/ecl/key/regex_patterns_string_1.xml @@ -0,0 +1,3 @@ + + PASSED + diff --git a/testing/regress/ecl/key/regex_patterns_utf8_1.xml b/testing/regress/ecl/key/regex_patterns_utf8_1.xml new file mode 100644 index 00000000000..1ef7377e136 --- /dev/null +++ b/testing/regress/ecl/key/regex_patterns_utf8_1.xml @@ -0,0 +1,3 @@ + + PASSED + diff --git a/testing/regress/ecl/key/regex_string_1.xml b/testing/regress/ecl/key/regex_string_1.xml deleted file mode 100644 index cf32b1ed0db..00000000000 --- a/testing/regress/ecl/key/regex_string_1.xml +++ /dev/null @@ -1,9 +0,0 @@ - - 922 - - - 827 - - - 95 - diff --git a/testing/regress/ecl/regex_patterns_string_1.ecl b/testing/regress/ecl/regex_patterns_string_1.ecl new file mode 100644 index 00000000000..733d5800c1c --- /dev/null +++ b/testing/regress/ecl/regex_patterns_string_1.ecl @@ -0,0 +1,896 @@ +/*############################################################################## + + HPCC SYSTEMS software Copyright (C) 2024 HPCC Systems®. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +############################################################################## */ + +//Tests derived from the python3 test suite + +#OPTION('globalFold', FALSE); + +regexTests := DATASET + ( + [ + {0001, 'abc', 'abc', TRUE}, + {0002, 'abc', 'xbc', FALSE}, + {0003, 'abc', 'axc', FALSE}, + {0004, 'abc', 'abx', FALSE}, + {0005, 'abc', 'xabcy', TRUE}, + {0006, 'abc', 'ababc', TRUE}, + {0007, 'ab*c', 'abc', TRUE}, + {0008, 'ab*bc', 'abc', TRUE}, + {0009, 'ab*bc', 'abbc', TRUE}, + {0010, 'ab*bc', 'abbbbc', TRUE}, + {0011, '.{1}', 'abbbbc', TRUE}, + {0012, '.{3,4}', 'abbbbc', TRUE}, + {0013, 'ab{0,}bc', 'abbbbc', TRUE}, + {0014, 'ab+bc', 'abbc', TRUE}, + {0015, 'ab+bc', 'abc', FALSE}, + {0016, 'ab+bc', 'abq', FALSE}, + {0017, 'ab{1,}bc', 'abq', FALSE}, + {0018, 'ab+bc', 'abbbbc', TRUE}, + {0019, 'ab{1,}bc', 'abbbbc', TRUE}, + {0020, 'ab{1,3}bc', 'abbbbc', TRUE}, + {0021, 'ab{3,4}bc', 'abbbbc', TRUE}, + {0022, 'ab{4,5}bc', 'abbbbc', FALSE}, + {0023, 'ab?bc', 'abbc', TRUE}, + {0024, 'ab?bc', 'abc', TRUE}, + {0025, 'ab{0,1}bc', 'abc', TRUE}, + {0026, 'ab?bc', 'abbbbc', FALSE}, + {0027, 'ab?c', 'abc', TRUE}, + {0028, 'ab{0,1}c', 'abc', TRUE}, + {0029, '^abc$', 'abc', TRUE}, + {0030, '^abc$', 'abcc', FALSE}, + {0031, '^abc', 'abcc', TRUE}, + {0032, '^abc$', 'aabc', FALSE}, + {0033, 'abc$', 'aabc', TRUE}, + {0034, 'abc$', 'aabcd', FALSE}, + {0035, '^', 'abc', TRUE}, + {0036, '$', 'abc', TRUE}, + {0037, 'a.c', 'abc', TRUE}, + {0038, 'a.c', 'axc', TRUE}, + {0039, 'a\nc', 'abc', FALSE}, + {0040, 'a.*c', 'axyzc', TRUE}, + {0041, 'a\n*c', 'axyzc', FALSE}, + {0042, 'a.*c', 'axyzd', FALSE}, + {0043, 'a\n*c', 'axyzd', FALSE}, + {0044, 'a[bc]d', 'abc', FALSE}, + {0045, 'a[bc]d', 'abd', TRUE}, + {0046, 'a[b]d', 'abd', TRUE}, + {0047, '[a][b][d]', 'abd', TRUE}, + {0048, '.[b].', 'abd', TRUE}, + {0049, '.[b].', 'aBd', FALSE}, + {0050, '(?i:.[b].)', 'abd', TRUE}, + {0051, '(?i:\n[b]\n)', 'abd', FALSE}, + {0052, 'a[b-d]e', 'abd', FALSE}, + {0053, 'a[b-d]e', 'ace', TRUE}, + {0054, 'a[b-d]', 'aac', TRUE}, + {0055, 'a[-b]', 'a-', TRUE}, + {0056, 'a[b-]', 'a-', TRUE}, + {0057, 'a]', 'a]', TRUE}, + {0058, 'a[]]b', 'a]b', TRUE}, + {0059, 'a[^bc]d', 'aed', TRUE}, + {0060, 'a[^bc]d', 'abd', FALSE}, + {0061, 'a[^-b]c', 'adc', TRUE}, + {0062, 'a[^-b]c', 'a-c', FALSE}, + {0063, 'a[^]b]c', 'a]c', FALSE}, + {0064, 'a[^]b]c', 'adc', TRUE}, + {0065, '\\ba\\b', 'a-', TRUE}, + {0066, '\\ba\\b', '-a', TRUE}, + {0067, '\\ba\\b', '-a-', TRUE}, + {0068, '\\by\\b', 'xy', FALSE}, + {0069, '\\by\\b', 'yz', FALSE}, + {0070, '\\by\\b', 'xyz', FALSE}, + {0071, '\\Ba\\B', 'a-', FALSE}, + {0072, '\\Ba\\B', '-a', FALSE}, + {0073, '\\Ba\\B', '-a-', FALSE}, + {0074, '\\By\\b', 'xy', TRUE}, + {0075, '\\by\\B', 'yz', TRUE}, + {0076, '\\By\\B', 'xyz', TRUE}, + {0077, '\\w', 'a', TRUE}, + {0078, '\\w', '-', FALSE}, + {0079, '\\W', 'a', FALSE}, + {0080, '\\W', '-', TRUE}, + {0081, 'a\\sb', 'a b', TRUE}, + {0082, 'a\\sb', 'a-b', FALSE}, + {0083, 'a\\Sb', 'a b', FALSE}, + {0084, 'a\\Sb', 'a-b', TRUE}, + {0085, '\\d', '1', TRUE}, + {0086, '\\d', '-', FALSE}, + {0087, '\\D', '1', FALSE}, + {0088, '\\D', '-', TRUE}, + {0089, '[\\w]', 'a', TRUE}, + {0090, '[\\w]', '-', FALSE}, + {0091, '[\\W]', 'a', FALSE}, + {0092, '[\\W]', '-', TRUE}, + {0093, 'a[\\s]b', 'a b', TRUE}, + {0094, 'a[\\s]b', 'a-b', FALSE}, + {0095, 'a[\\S]b', 'a b', FALSE}, + {0096, 'a[\\S]b', 'a-b', TRUE}, + {0097, '[\\d]', '1', TRUE}, + {0098, '[\\d]', '-', FALSE}, + {0099, '[\\D]', '1', FALSE}, + {0100, '[\\D]', '-', TRUE}, + {0101, 'ab|cd', 'abc', TRUE}, + {0102, 'ab|cd', 'abcd', TRUE}, + {0103, '()ef', 'def', TRUE}, + {0104, '$b', 'b', FALSE}, + {0105, 'a\\(b', 'a(b', TRUE}, + {0106, 'a\\(*b', 'ab', TRUE}, + {0107, 'a\\(*b', 'a((b', TRUE}, + {0109, '((a))', 'abc', TRUE}, + {0110, '(a)b(c)', 'abc', TRUE}, + {0111, 'a+b+c', 'aabbabc', TRUE}, + {0112, 'a{1,}b{1,}c', 'aabbabc', TRUE}, + {0113, 'a.+?c', 'abcabc', TRUE}, + {0114, '(a+|b)*', 'ab', TRUE}, + {0115, '(a+|b){0,}', 'ab', TRUE}, + {0116, '(a+|b)+', 'ab', TRUE}, + {0117, '(a+|b){1,}', 'ab', TRUE}, + {0118, '(a+|b)?', 'ab', TRUE}, + {0119, '(a+|b){0,1}', 'ab', TRUE}, + {0120, '[^ab]*', 'cde', TRUE}, + {0121, '([abc])*d', 'abbbcd', TRUE}, + {0122, '([abc])*bcd', 'abcd', TRUE}, + {0123, 'a|b|c|d|e', 'e', TRUE}, + {0124, '(a|b|c|d|e)f', 'ef', TRUE}, + {0125, 'abcd*efg', 'abcdefg', TRUE}, + {0126, 'ab*', 'xabyabbbz', TRUE}, + {0127, 'ab*', 'xayabbbz', TRUE}, + {0128, '(ab|cd)e', 'abcde', TRUE}, + {0129, '[abhgefdc]ij', 'hij', TRUE}, + {0130, '^(ab|cd)e', 'abcde', FALSE}, + {0131, '(abc|)ef', 'abcdef', TRUE}, + {0132, '(a|b)c*d', 'abcd', TRUE}, + {0133, '(ab|ab*)bc', 'abc', TRUE}, + {0134, 'a([bc]*)c*', 'abc', TRUE}, + {0135, 'a([bc]*)(c*d)', 'abcd', TRUE}, + {0136, 'a([bc]+)(c*d)', 'abcd', TRUE}, + {0137, 'a([bc]*)(c+d)', 'abcd', TRUE}, + {0138, 'a[bcd]*dcdcde', 'adcdcde', TRUE}, + {0139, 'a[bcd]+dcdcde', 'adcdcde', FALSE}, + {0140, '(ab|a)b*c', 'abc', TRUE}, + {0141, '((a)(b)c)(d)', 'abcd', TRUE}, + {0142, '[a-zA-Z_][a-zA-Z0-9_]*', 'alpha', TRUE}, + {0143, '[_A-Z]', '}', FALSE}, + {0144, '^a(bc+|b[eh])g|.h$', 'abh', TRUE}, + {0145, '(bc+d$|ef*g.|h?i(j|k))', 'effgz', TRUE}, + {0146, '(bc+d$|ef*g.|h?i(j|k))', 'ij', TRUE}, + {0147, '(bc+d$|ef*g.|h?i(j|k))', 'effg', FALSE}, + {0148, '(bc+d$|ef*g.|h?i(j|k))', 'bcdd', FALSE}, + {0149, '(bc+d$|ef*g.|h?i(j|k))', 'reffgz', TRUE}, + {0150, '((((((((((a))))))))))', 'a', TRUE}, + {0151, '((((((((((a))))))))))\\10', 'aa', TRUE}, + {0154, '(((((((((a)))))))))', 'a', TRUE}, + {0155, '[89]+', '1((((((7(9))))))', TRUE}, + {0156, 'multiple words of text', 'uh-uh', FALSE}, + {0157, 'multiple words', 'multiple words, yeah', TRUE}, + {0158, '(.*)c(.*)', 'abcde', TRUE}, + {0159, '\\((.*), (.*)\\)', '(a, b)', TRUE}, + {0160, '[k]', 'ab', FALSE}, + {0161, 'abcd', 'abcd', TRUE}, + {0162, 'a(bc)d', 'abcd', TRUE}, + {0163, 'a[-]?c', 'ac', TRUE}, + {0164, '(abc)\\1', 'abcabc', TRUE}, + {0165, '([a-c]*)\\1', 'abcabc', TRUE}, + {0166, '(a)|\\1', 'a', TRUE}, + {0167, '(a)|\\1', 'x', FALSE}, + {0168, '(?:(b)?a)\\1', 'a', FALSE}, + {0169, '(([a-c])b*?\\2)*', 'ababbbcbc', TRUE}, + {0170, '(([a-c])b*?\\2){3}', 'ababbbcbc', TRUE}, + {0171, '((\\3|b)\\2(a)x)+', 'aaxabxbaxbbx', FALSE}, + {0172, '((\\3|b)\\2(a)x)+', 'aaaxabaxbaaxbbax', TRUE}, + {0173, '((\\3|b)\\2(a)){2,}', 'bbaababbabaaaaabbaaaabba', TRUE}, + {0174, '^((.)?a\\2)+$', 'babadad', FALSE}, + {0175, '(a)|(b)', 'b', TRUE}, + {0176, 'a(?!b).', 'abad', TRUE}, + {0177, 'a(?=d).', 'abad', TRUE}, + {0178, 'a(?=c|d).', 'abad', TRUE}, + {0179, 'a(?:b|c|d)(.)', 'ace', TRUE}, + {0180, 'a(?:b|c|d)*(.)', 'ace', TRUE}, + {0181, 'a(?:b|c|d)+?(.)', 'ace', TRUE}, + {0182, 'a(?:b|c|d)+?(.)', 'acdbcdbe', TRUE}, + {0183, 'a(?:b|c|d)+(.)', 'acdbcdbe', TRUE}, + {0184, 'a(?:b|c|d){2}(.)', 'acdbcdbe', TRUE}, + {0185, 'a(?:b|c|d){4,5}(.)', 'acdbcdbe', TRUE}, + {0186, 'a(?:b|c|d){4,5}?(.)', 'acdbcdbe', TRUE}, + {0187, '((foo)|(bar))*', 'foobar', TRUE}, + {0188, 'a(?:b|c|d){6,7}(.)', 'acdbcdbe', TRUE}, + {0189, 'a(?:b|c|d){6,7}?(.)', 'acdbcdbe', TRUE}, + {0190, 'a(?:b|c|d){5,6}(.)', 'acdbcdbe', TRUE}, + {0191, 'a(?:b|c|d){5,6}?(.)', 'acdbcdbe', TRUE}, + {0192, 'a(?:b|c|d){5,7}(.)', 'acdbcdbe', TRUE}, + {0193, 'a(?:b|c|d){5,7}?(.)', 'acdbcdbe', TRUE}, + {0194, 'a(?:b|(c|e){1,2}?|d)+?(.)', 'ace', TRUE}, + {0195, '^(.+)?B', 'AB', TRUE}, + {0196, '^([^a-z])|(\\^)$', '.', TRUE}, + {0197, '^[<>]&', '<&OUT', TRUE}, + {0198, '^(a\\1?){4}$', 'aaaaaaaaaa', TRUE}, + {0199, '^(a\\1?){4}$', 'aaaaaaaaa', FALSE}, + {0200, '^(a\\1?){4}$', 'aaaaaaaaaaa', FALSE}, + {0201, '^(a(?(1)\\1)){4}$', 'aaaaaaaaaa', TRUE}, + {0202, '^(a(?(1)\\1)){4}$', 'aaaaaaaaa', FALSE}, + {0203, '^(a(?(1)\\1)){4}$', 'aaaaaaaaaaa', FALSE}, + {0204, '((?(1)a|b))+', 'baaa', TRUE}, + {0205, '((?(1)aa|b))+', 'baaaa', TRUE}, + {0206, '((a{4})+)', 'aaaaaaaaa', TRUE}, + {0207, '(((aa){2})+)', 'aaaaaaaaaa', TRUE}, + {0208, '(((a{2}){2})+)', 'aaaaaaaaaa', TRUE}, + {0209, '(?:(f)(o)(o)|(b)(a)(r))*', 'foobar', TRUE}, + {0210, '(?<=a)b', 'ab', TRUE}, + {0211, '(?<=a)b', 'cb', FALSE}, + {0212, '(?<=a)b', 'b', FALSE}, + {0213, '(?a+)ab', 'aaab', FALSE}, + {0285, '(?>a+)b', 'aaab', TRUE}, + {0286, '([[:alpha:]]+)', 'ABcd01Xy__-- ${nulnul}${ffff}', TRUE}, + {0287, '([[:alnum:]]+)', 'ABcd01Xy__-- ${nulnul}${ffff}', TRUE}, + {0288, '([[:cntrl:]]+)', 'ABcd01Xy__-- ${nulnul}${ffff}', TRUE}, + {0289, '([[:digit:]]+)', 'ABcd01Xy__-- ${nulnul}${ffff}', TRUE}, + {0290, '([[:graph:]]+)', 'ABcd01Xy__-- ${nulnul}${ffff}', TRUE}, + {0291, '([[:lower:]]+)', 'ABcd01Xy__-- ${nulnul}${ffff}', TRUE}, + {0292, '([[:print:]]+)', 'ABcd01Xy__-- ${nulnul}${ffff}', TRUE}, + {0293, '([[:punct:]]+)', 'ABcd01Xy__-- ${nulnul}${ffff}', TRUE}, + {0294, '([[:space:]]+)', 'ABcd01Xy__-- ${nulnul}${ffff}', TRUE}, + {0295, '([[:word:]]+)', 'ABcd01Xy__-- ${nulnul}${ffff}', TRUE}, + {0296, '([[:upper:]]+)', 'ABcd01Xy__-- ${nulnul}${ffff}', TRUE}, + {0297, '([[:xdigit:]]+)', 'ABcd01Xy__-- ${nulnul}${ffff}', TRUE}, + {0298, '([[:^alpha:]]+)', 'ABcd01Xy__-- ${nulnul}${ffff}', TRUE}, + {0299, '([[:^cntrl:]]+)', 'ABcd01Xy__-- ${nulnul}${ffff}', TRUE}, + {0300, '([[:^digit:]]+)', 'ABcd01Xy__-- ${nulnul}${ffff}', TRUE}, + {0301, '([[:^lower:]]+)', 'ABcd01Xy__-- ${nulnul}${ffff}', TRUE}, + {0302, '([[:^punct:]]+)', 'ABcd01Xy__-- ${nulnul}${ffff}', TRUE}, + {0303, '([[:^space:]]+)', 'ABcd01Xy__-- ${nulnul}${ffff}', TRUE}, + {0304, '([[:^upper:]]+)', 'ABcd01Xy__-- ${nulnul}${ffff}', TRUE}, + {0305, '([[:^xdigit:]]+)', 'ABcd01Xy__-- ${nulnul}${ffff}', TRUE}, + {0307, '((?>a+)b)', 'aaab', TRUE}, + {0308, '(?>(a+))b', 'aaab', TRUE}, + {0309, '((?>[^()]+)|\\([^()]*\\))+', '((abc(ade)ufh()()x', TRUE}, + {0310, '\\z', 'a\nb\n', TRUE}, + {0311, '$', 'a\nb\n', TRUE}, + {0312, '\\z', 'b\na\n', TRUE}, + {0313, '$', 'b\na\n', TRUE}, + {0314, '\\z', 'b\na', TRUE}, + {0315, '$', 'b\na', TRUE}, + {0322, 'a\\z', 'a\nb\n', FALSE}, + {0323, 'a$', 'a\nb\n', FALSE}, + {0324, 'a\\Z', 'b\na\n', TRUE}, + {0325, 'a\\z', 'b\na\n', FALSE}, + {0326, 'a$', 'b\na\n', TRUE}, + {0327, 'a\\z', 'b\na', TRUE}, + {0328, 'a$', 'b\na', TRUE}, + {0336, 'aa\\z', 'aa\nb\n', FALSE}, + {0337, 'aa$', 'aa\nb\n', FALSE}, + {0338, 'aa\\Z', 'b\naa\n', TRUE}, + {0339, 'aa\\z', 'b\naa\n', FALSE}, + {0340, 'aa$', 'b\naa\n', TRUE}, + {0341, 'aa\\z', 'b\naa', TRUE}, + {0342, 'aa$', 'b\naa', TRUE}, + {0350, 'aa\\z', 'ac\nb\n', FALSE}, + {0351, 'aa$', 'ac\nb\n', FALSE}, + {0352, 'aa\\z', 'b\nac\n', FALSE}, + {0353, 'aa$', 'b\nac\n', FALSE}, + {0354, 'aa\\z', 'b\nac', FALSE}, + {0355, 'aa$', 'b\nac', FALSE}, + {0362, 'aa\\z', 'ca\nb\n', FALSE}, + {0363, 'aa$', 'ca\nb\n', FALSE}, + {0364, 'aa\\z', 'b\nca\n', FALSE}, + {0365, 'aa$', 'b\nca\n', FALSE}, + {0366, 'aa\\z', 'b\nca', FALSE}, + {0367, 'aa$', 'b\nca', FALSE}, + {0374, 'ab\\z', 'ab\nb\n', FALSE}, + {0375, 'ab$', 'ab\nb\n', FALSE}, + {0376, 'ab\\Z', 'b\nab\n', TRUE}, + {0377, 'ab\\z', 'b\nab\n', FALSE}, + {0378, 'ab$', 'b\nab\n', TRUE}, + {0379, 'ab\\z', 'b\nab', TRUE}, + {0380, 'ab$', 'b\nab', TRUE}, + {0388, 'ab\\z', 'ac\nb\n', FALSE}, + {0389, 'ab$', 'ac\nb\n', FALSE}, + {0390, 'ab\\z', 'b\nac\n', FALSE}, + {0391, 'ab$', 'b\nac\n', FALSE}, + {0392, 'ab\\z', 'b\nac', FALSE}, + {0393, 'ab$', 'b\nac', FALSE}, + {0400, 'ab\\z', 'ca\nb\n', FALSE}, + {0401, 'ab$', 'ca\nb\n', FALSE}, + {0402, 'ab\\z', 'b\nca\n', FALSE}, + {0403, 'ab$', 'b\nca\n', FALSE}, + {0404, 'ab\\z', 'b\nca', FALSE}, + {0405, 'ab$', 'b\nca', FALSE}, + {0412, 'abb\\z', 'abb\nb\n', FALSE}, + {0413, 'abb$', 'abb\nb\n', FALSE}, + {0414, 'abb\\Z', 'b\nabb\n', TRUE}, + {0415, 'abb\\z', 'b\nabb\n', FALSE}, + {0416, 'abb$', 'b\nabb\n', TRUE}, + {0417, 'abb\\z', 'b\nabb', TRUE}, + {0418, 'abb$', 'b\nabb', TRUE}, + {0426, 'abb\\z', 'ac\nb\n', FALSE}, + {0427, 'abb$', 'ac\nb\n', FALSE}, + {0428, 'abb\\z', 'b\nac\n', FALSE}, + {0429, 'abb$', 'b\nac\n', FALSE}, + {0430, 'abb\\z', 'b\nac', FALSE}, + {0431, 'abb$', 'b\nac', FALSE}, + {0438, 'abb\\z', 'ca\nb\n', FALSE}, + {0439, 'abb$', 'ca\nb\n', FALSE}, + {0440, 'abb\\z', 'b\nca\n', FALSE}, + {0441, 'abb$', 'b\nca\n', FALSE}, + {0442, 'abb\\z', 'b\nca', FALSE}, + {0443, 'abb$', 'b\nca', FALSE}, + {0451, '(^|x)(c)', 'ca', TRUE}, + {0452, 'a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz', 'x', FALSE}, + {0453, 'round\\(((?>[^()]+))\\)', '_I(round(xs * sz),1)', TRUE}, + {0456, 'foo.bart', 'foo.bart', TRUE}, + {0458, 'tt+$', 'xxxtt', TRUE}, + {0459, '\\GX.*X', 'aaaXbX', FALSE}, + {0460, '(\\d+\\.\\d+)', '3.1415926', TRUE}, + {0461, '(\\ba.{0,10}br)', 'have a web browser', TRUE}, + {0462, '^([a-z]:)', 'C:/', FALSE}, + {0464, '(^|a)b', 'ab', TRUE}, + {0465, '^([ab]*?)(b)?(c)$', 'abac', TRUE}, + {0466, '(\\w)?(abc)\\1b', 'abcab', FALSE}, + {0467, '^(?:.,){2}c', 'a,b,c', TRUE}, + {0468, '^(.,){2}c', 'a,b,c', TRUE}, + {0469, '^(?:[^,]*,){2}c', 'a,b,c', TRUE}, + {0470, '^([^,]*,){2}c', 'a,b,c', TRUE}, + {0471, '^([^,]*,){3}d', 'aaa,b,c,d', TRUE}, + {0472, '^([^,]*,){3,}d', 'aaa,b,c,d', TRUE}, + {0473, '^([^,]*,){0,3}d', 'aaa,b,c,d', TRUE}, + {0474, '^([^,]{1,3},){3}d', 'aaa,b,c,d', TRUE}, + {0475, '^([^,]{1,3},){3,}d', 'aaa,b,c,d', TRUE}, + {0476, '^([^,]{1,3},){0,3}d', 'aaa,b,c,d', TRUE}, + {0477, '^([^,]{1,},){3}d', 'aaa,b,c,d', TRUE}, + {0478, '^([^,]{1,},){3,}d', 'aaa,b,c,d', TRUE}, + {0479, '^([^,]{1,},){0,3}d', 'aaa,b,c,d', TRUE}, + {0480, '^([^,]{0,3},){3}d', 'aaa,b,c,d', TRUE}, + {0481, '^([^,]{0,3},){3,}d', 'aaa,b,c,d', TRUE}, + {0482, '^([^,]{0,3},){0,3}d', 'aaa,b,c,d', TRUE}, + {0484, '^(a(b)?)+$', 'aba', TRUE}, + {0485, '^(aa(bb)?)+$', 'aabbaa', TRUE}, + {0487, '^(a)?a$', 'a', TRUE}, + {0488, '^(a)?(?(1)a|b)+$', 'a', FALSE}, + {0489, '^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$', 'aaaaaa', TRUE}, + {0490, '^(a\\1?){4}$', 'aaaaaa', TRUE}, + {0491, '^(0+)?(?:x(1))?', 'x1', TRUE}, + {0492, '^([0-9a-fA-F]+)(?:x([0-9a-fA-F]+)?)(?:x([0-9a-fA-F]+))?', '012cxx0190', TRUE}, + {0493, '^(b+?|a){1,2}c', 'bbbac', TRUE}, + {0494, '^(b+?|a){1,2}c', 'bbbbac', TRUE}, + {0495, '\\((\\w\\. \\w+)\\)', 'cd. (A. Tw)', TRUE}, + {0496, '((?:aaaa|bbbb)cccc)?', 'aaaacccc', TRUE}, + {0497, '((?:aaaa|bbbb)cccc)?', 'bbbbcccc', TRUE}, + {0498, '(a)?(a)+', 'a', TRUE}, + {0499, '(ab)?(ab)+', 'ab', TRUE}, + {0500, '(abc)?(abc)+', 'abc', TRUE}, + {0502, '\\ba', 'a', TRUE}, + {0503, 'ab(?i)cd', 'AbCd', FALSE}, + {0504, 'ab(?i)cd', 'abCd', TRUE}, + {0505, '(A|B)*(?(1)(CD)|(CD))', 'CD', TRUE}, + {0506, '(A|B)*(?(1)(CD)|(CD))', 'ABCD', TRUE}, + {0507, '(A|B)*?(?(1)(CD)|(CD))', 'CD', TRUE}, + {0508, '(A|B)*?(?(1)(CD)|(CD))', 'ABCD', TRUE}, + {0509, '(.*)\\d+\\1', 'abc12bc', TRUE}, + {0510, '(?m:(foo\\s*$))', 'foo\n bar', TRUE}, + {0511, '(.*)c', 'abcd', TRUE}, + {0512, '(.*)(?=c)', 'abcd', TRUE}, + {0513, '(.*)(?=c)c', 'abcd', TRUE}, + {0514, '(.*)(?=b|c)', 'abcd', TRUE}, + {0515, '(.*)(?=b|c)c', 'abcd', TRUE}, + {0516, '(.*)(?=c|b)', 'abcd', TRUE}, + {0517, '(.*)(?=c|b)c', 'abcd', TRUE}, + {0518, '(.*)(?=[bc])', 'abcd', TRUE}, + {0519, '(.*)(?=[bc])c', 'abcd', TRUE}, + {0520, '(.*)(?<=b)', 'abcd', TRUE}, + {0521, '(.*)(?<=b)c', 'abcd', TRUE}, + {0522, '(.*)(?<=b|c)', 'abcd', TRUE}, + {0523, '(.*)(?<=b|c)c', 'abcd', TRUE}, + {0524, '(.*)(?<=c|b)', 'abcd', TRUE}, + {0525, '(.*)(?<=c|b)c', 'abcd', TRUE}, + {0526, '(.*)(?<=[bc])', 'abcd', TRUE}, + {0527, '(.*)(?<=[bc])c', 'abcd', TRUE}, + {0528, '(.*?)c', 'abcd', TRUE}, + {0529, '(.*?)(?=c)', 'abcd', TRUE}, + {0530, '(.*?)(?=c)c', 'abcd', TRUE}, + {0531, '(.*?)(?=b|c)', 'abcd', TRUE}, + {0532, '(.*?)(?=b|c)c', 'abcd', TRUE}, + {0533, '(.*?)(?=c|b)', 'abcd', TRUE}, + {0534, '(.*?)(?=c|b)c', 'abcd', TRUE}, + {0535, '(.*?)(?=[bc])', 'abcd', TRUE}, + {0536, '(.*?)(?=[bc])c', 'abcd', TRUE}, + {0537, '(.*?)(?<=b)', 'abcd', TRUE}, + {0538, '(.*?)(?<=b)c', 'abcd', TRUE}, + {0539, '(.*?)(?<=b|c)', 'abcd', TRUE}, + {0540, '(.*?)(?<=b|c)c', 'abcd', TRUE}, + {0541, '(.*?)(?<=c|b)', 'abcd', TRUE}, + {0542, '(.*?)(?<=c|b)c', 'abcd', TRUE}, + {0543, '(.*?)(?<=[bc])', 'abcd', TRUE}, + {0544, '(.*?)(?<=[bc])c', 'abcd', TRUE}, + {0545, '2(]*)?$\\1', '2', TRUE}, + {0546, 'a(b)??', 'abc', TRUE}, + {0547, '(\\d{1,3}\\.){3,}', '128.134.142.8', TRUE}, + {0548, '^.{3,4}(.+)\\1\\z', 'foobarbar', TRUE}, + {0549, '^(?:f|o|b){3,4}(.+)\\1\\z', 'foobarbar', TRUE}, + {0550, '^.{3,4}((?:b|a|r)+)\\1\\z', 'foobarbar', TRUE}, + {0551, '^(?:f|o|b){3,4}((?:b|a|r)+)\\1\\z', 'foobarbar', TRUE}, + {0552, '^.{3,4}(.+?)\\1\\z', 'foobarbar', TRUE}, + {0553, '^(?:f|o|b){3,4}(.+?)\\1\\z', 'foobarbar', TRUE}, + {0554, '^.{3,4}((?:b|a|r)+?)\\1\\z', 'foobarbar', TRUE}, + {0555, '^(?:f|o|b){3,4}((?:b|a|r)+?)\\1\\z', 'foobarbar', TRUE}, + {0556, '^.{2,3}?(.+)\\1\\z', 'foobarbar', TRUE}, + {0557, '^(?:f|o|b){2,3}?(.+)\\1\\z', 'foobarbar', TRUE}, + {0558, '^.{2,3}?((?:b|a|r)+)\\1\\z', 'foobarbar', TRUE}, + {0559, '^(?:f|o|b){2,3}?((?:b|a|r)+)\\1\\z', 'foobarbar', TRUE}, + {0560, '^.{2,3}?(.+?)\\1\\z', 'foobarbar', TRUE}, + {0561, '^(?:f|o|b){2,3}?(.+?)\\1\\z', 'foobarbar', TRUE}, + {0562, '^.{2,3}?((?:b|a|r)+?)\\1\\z', 'foobarbar', TRUE}, + {0563, '^(?:f|o|b){2,3}?((?:b|a|r)+?)\\1\\z', 'foobarbar', TRUE}, + {0564, '.*a(?!(b|cd)*e).*f', '......abef', FALSE}, + {0565, '(WORDS|WORD)S', 'WORDS', TRUE}, + {0566, '(X.|WORDS|X.|WORD)S', 'WORDS', TRUE}, + {0567, '(WORDS|WORLD|WORD)S', 'WORDS', TRUE}, + {0568, '(X.|WORDS|WORD|Y.)S', 'WORDS', TRUE}, + {0569, '(foo|fool|x.|money|parted)$', 'fool', TRUE}, + {0570, '(x.|foo|fool|x.|money|parted|y.)$', 'fool', TRUE}, + {0571, '(foo|fool|money|parted)$', 'fool', TRUE}, + {0572, '(foo|fool|x.|money|parted)$', 'fools', FALSE}, + {0573, '(x.|foo|fool|x.|money|parted|y.)$', 'fools', FALSE}, + {0574, '(foo|fool|money|parted)$', 'fools', FALSE}, + {0575, '(a|aa|aaa||aaaa|aaaaa|aaaaaa)(b|c)', 'aaaaaaaaaaaaaaab', TRUE}, + {0576, '^(a*?)(?!(aa|aaaa)*$)', 'aaaaaaaaaaaaaaaaaaaa', TRUE}, + {0577, '^(a*?)(?!(aa|aaaa)*$)(?=a\\z)', 'aaaaaaaa', TRUE}, + {0578, '^(.)\\s+.$(?(1))', 'A B', TRUE}, + {0579, '(?:r?)*?r|(.{2,4})', 'abcde', TRUE}, + {0580, '(?!)+?|(.{2,4})', 'abcde', TRUE}, + {0581, '^(a*?)(?!(a{6}|a{5})*$)', 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', TRUE}, + {0582, '^((?>(?:aa)?b)?)', 'aab', TRUE}, + {0583, '^((?:aa)*)(?:X+((?:\\d+|-)(?:X+(.+))?))?$', 'aaaaX5', TRUE}, + {0584, 'X(A|B||C|D)Y', 'XXXYYY', TRUE}, + {0585, '(?i:X([A]|[B]|y[Y]y|[D]|)Y)', 'XXXYYYB', TRUE}, + {0586, '^([a]{1})*$', 'aa', TRUE}, + {0587, 'a(?!b(?!c))(..)', 'abababc', TRUE}, + {0588, 'a(?!b(?=a))(..)', 'abababc', TRUE}, + {0589, 'a(?!b(?!c(?!d(?!e))))...(.)', 'abxabcdxabcde', TRUE}, + {0590, 'X(?!b+(?!(c+)*(?!(c+)*d))).*X', 'aXbbbbbbbcccccccccccccaaaX', TRUE}, + {0591, '^(XXXXXXXXXX|YYYYYYYYYY|Z.Q*X|Z[TE]Q*P):', 'ZEQQQQQQQQQQQQQQQQQQP:', TRUE}, + {0592, '^(XXXXXXXXXX|YYYYYYYYYY|Z.Q*X|Z[TE]Q*P):', 'ZEQQQX:', TRUE}, + {0593, '^([TUV]+|XXXXXXXXXX|YYYYYYYYYY|Z.Q*X|Z[TE]Q*P):', 'ZEQQQQQQQQQQQQQQQQQQP:', TRUE}, + {0594, '^([TUV]+|XXXXXXXXXX|YYYYYYYYYY|Z.Q*X|Z[TE]Q*P):', 'ZEQQQX:', TRUE}, + {0595, '^([TUV]+|XXXXXXXXXX|YYYYYYYYYY|Z.Q*X|Z[TE]Q*P|[MKJ]):', 'ZEQQQQQQQQQQQQQQQQQQP:', TRUE}, + {0596, '^([TUV]+|XXXXXXXXXX|YYYYYYYYYY|Z.Q*X|Z[TE]Q*P|[MKJ]):', 'ZEQQQX:', TRUE}, + {0597, '^(XXX|YYY|Z.Q*X|Z[TE]Q*P):', 'ZEQQQQQQQQQQQQQQQQQQP:', TRUE}, + {0598, '^(XXX|YYY|Z.Q*X|Z[TE]Q*P):', 'ZEQQQX:', TRUE}, + {0599, '^([TUV]+|XXX|YYY|Z.Q*X|Z[TE]Q*P):', 'ZEQQQQQQQQQQQQQQQQQQP:', TRUE}, + {0600, '^([TUV]+|XXX|YYY|Z.Q*X|Z[TE]Q*P):', 'ZEQQQX:', TRUE}, + {0601, '^([TUV]+|XXX|YYY|Z.Q*X|Z[TE]Q*P|[MKJ]):', 'ZEQQQQQQQQQQQQQQQQQQP:', TRUE}, + {0602, '^([TUV]+|XXX|YYY|Z.Q*X|Z[TE]Q*P|[MKJ]):', 'ZEQQQX:', TRUE}, + {0603, 'X(?:ABCF[cC]x*|ABCD|ABCF):(?:DIT|DID|DIM)', 'XABCFCxxxxxxxxxx:DIM', TRUE}, + {0604, '(((ABCD|ABCE|ABCF)))(A|B|C[xy]*):', 'ABCFCxxxxxxxxxx:DIM', TRUE}, + {0605, '(?=foo)', 'foo', TRUE}, + {0606, '(?=foo)', 'XfooY', TRUE}, + {0607, '.*(?=foo)', 'XfooY', TRUE}, + {0608, '(?=.*P)P', 'aP', TRUE}, + {0609, '(?<=foo)', 'foo', TRUE}, + {0610, '(?<=foo)', 'XfooY', TRUE}, + {0611, '.*(?<=foo)', 'foo', TRUE}, + {0612, '.*(?<=foo)', 'XfooY', TRUE}, + {0613, '(?<=foo)Y', 'XfooY', TRUE}, + {0614, 'o(?<=foo)Y', '..XfooY..', TRUE}, + {0615, 'X(?=foo)f', '..XfooY..', TRUE}, + {0616, 'X(?=foo)', '..XfooY..', TRUE}, + {0617, 'X(?<=foo.)[YZ]', '..XfooXY..', TRUE}, + {0618, '(?=XY*foo)', 'Xfoo', TRUE}, + {0619, '^(?=XY*foo)', 'Xfoo', TRUE}, + {0620, '^(<(?:[^<>]+|(?3)|(?1))*>)()(!>!>!>)$', '<!>!>><>>!>!>!>', TRUE}, + {0621, '^(<(?:[^<>]+|(?1))*>)$', '<<><<<><>>>>', TRUE}, + {0622, '((?2)*)([fF]o+)', 'fooFoFoo', TRUE}, + {0623, '(<(?:[^<>]+|(?R))*>)', '<<><<<><>>>>', TRUE}, + {0624, '(?foo|bar|baz)', 'snofooewa', TRUE}, + {0625, '(?foo|bar|baz)(?[ew]+)', 'snofooewa', TRUE}, + {0626, '(?foo)?(?()bar|nada)', 'foobar', TRUE}, + {0627, '(?foo)?(?()bar|nada)', 'foo-barnada', TRUE}, + {0628, '(?foo)?(?(1)bar|nada)', 'foo-barnada', TRUE}, + {0629, '(?foo(?(R)bar))?(?1)', 'foofoobar', TRUE}, + {0630, '(x)(?foo(?(R&A)bar))?(?&A)', 'xfoofoobar', TRUE}, + {0631, '(x)(?foo(?(R2)bar))?(?&A)', 'xfoofoobar', TRUE}, + {0632, '(?1)(?(DEFINE)(blah))', 'blah', TRUE}, + {0633, 'foo(?0)?bar', 'phoofoofoobarbarbarr', TRUE}, + {0634, 'foo(?R)?bar', 'phoofoofoobarbarbarr', TRUE}, + {0635, 'a++a', 'aaaaa', FALSE}, + {0636, 'a*+a', 'aaaaa', FALSE}, + {0637, 'a{1,5}+a', 'aaaaa', FALSE}, + {0638, 'a?+a', 'ab', FALSE}, + {0639, 'a++b', 'aaaaab', TRUE}, + {0640, 'a*+b', 'aaaaab', TRUE}, + {0641, 'a{1,5}+b', 'aaaaab', TRUE}, + {0642, 'a?+b', 'ab', TRUE}, + {0643, 'fooa++a', 'fooaaaaa', FALSE}, + {0644, 'fooa*+a', 'fooaaaaa', FALSE}, + {0645, 'fooa{1,5}+a', 'fooaaaaa', FALSE}, + {0646, 'fooa?+a', 'fooab', FALSE}, + {0647, 'fooa++b', 'fooaaaaab', TRUE}, + {0648, 'fooa*+b', 'fooaaaaab', TRUE}, + {0649, 'fooa{1,5}+b', 'fooaaaaab', TRUE}, + {0650, 'fooa?+b', 'fooab', TRUE}, + {0651, '(?:aA)++(?:aA)', 'aAaAaAaAaA', FALSE}, + {0652, '(aA)++(aA)', 'aAaAaAaAaA', FALSE}, + {0653, '(aA|bB)++(aA|bB)', 'aAaAbBaAbB', FALSE}, + {0654, '(?:aA|bB)++(?:aA|bB)', 'aAbBbBbBaA', FALSE}, + {0655, '(?:aA)*+(?:aA)', 'aAaAaAaAaA', FALSE}, + {0656, '(aA)*+(aA)', 'aAaAaAaAaA', FALSE}, + {0657, '(aA|bB)*+(aA|bB)', 'aAaAbBaAaA', FALSE}, + {0658, '(?:aA|bB)*+(?:aA|bB)', 'aAaAaAbBaA', FALSE}, + {0659, '(?:aA){1,5}+(?:aA)', 'aAaAaAaAaA', FALSE}, + {0660, '(aA){1,5}+(aA)', 'aAaAaAaAaA', FALSE}, + {0661, '(aA|bB){1,5}+(aA|bB)', 'aAaAbBaAaA', FALSE}, + {0662, '(?:aA|bB){1,5}+(?:aA|bB)', 'bBbBbBbBbB', FALSE}, + {0663, '(?:aA)?+(?:aA)', 'aAb', FALSE}, + {0664, '(aA)?+(aA)', 'aAb', FALSE}, + {0665, '(aA|bB)?+(aA|bB)', 'bBb', FALSE}, + {0666, '(?:aA|bB)?+(?:aA|bB)', 'aAb', FALSE}, + {0667, '(?:aA)++b', 'aAaAaAaAaAb', TRUE}, + {0668, '(aA)++b', 'aAaAaAaAaAb', TRUE}, + {0669, '(aA|bB)++b', 'aAbBaAaAbBb', TRUE}, + {0670, '(?:aA|bB)++b', 'aAbBbBaAaAb', TRUE}, + {0671, '(?:aA)*+b', 'aAaAaAaAaAb', TRUE}, + {0672, '(aA)*+b', 'aAaAaAaAaAb', TRUE}, + {0673, '(aA|bB)*+b', 'bBbBbBbBbBb', TRUE}, + {0674, '(?:aA|bB)*+b', 'bBaAbBbBaAb', TRUE}, + {0675, '(?:aA){1,5}+b', 'aAaAaAaAaAb', TRUE}, + {0676, '(aA){1,5}+b', 'aAaAaAaAaAb', TRUE}, + {0677, '(aA|bB){1,5}+b', 'bBaAbBaAbBb', TRUE}, + {0678, '(?:aA|bB){1,5}+b', 'aAbBaAbBbBb', TRUE}, + {0679, '(?:aA)?+b', 'aAb', TRUE}, + {0680, '(aA)?+b', 'aAb', TRUE}, + {0681, '(aA|bB)?+b', 'bBb', TRUE}, + {0682, '(?:aA|bB)?+b', 'bBb', TRUE}, + {0683, 'foo(?:aA)++(?:aA)', 'fooaAaAaAaAaA', FALSE}, + {0684, 'foo(aA)++(aA)', 'fooaAaAaAaAaA', FALSE}, + {0685, 'foo(aA|bB)++(aA|bB)', 'foobBbBbBaAaA', FALSE}, + {0686, 'foo(?:aA|bB)++(?:aA|bB)', 'fooaAaAaAaAaA', FALSE}, + {0687, 'foo(?:aA)*+(?:aA)', 'fooaAaAaAaAaA', FALSE}, + {0688, 'foo(aA)*+(aA)', 'fooaAaAaAaAaA', FALSE}, + {0689, 'foo(aA|bB)*+(aA|bB)', 'foobBaAbBaAaA', FALSE}, + {0690, 'foo(?:aA|bB)*+(?:aA|bB)', 'fooaAaAbBbBaA', FALSE}, + {0691, 'foo(?:aA){1,5}+(?:aA)', 'fooaAaAaAaAaA', FALSE}, + {0692, 'foo(aA){1,5}+(aA)', 'fooaAaAaAaAaA', FALSE}, + {0693, 'foo(aA|bB){1,5}+(aA|bB)', 'fooaAbBbBaAaA', FALSE}, + {0694, 'foo(?:aA|bB){1,5}+(?:aA|bB)', 'fooaAbBbBaAbB', FALSE}, + {0695, 'foo(?:aA)?+(?:aA)', 'fooaAb', FALSE}, + {0696, 'foo(aA)?+(aA)', 'fooaAb', FALSE}, + {0697, 'foo(aA|bB)?+(aA|bB)', 'foobBb', FALSE}, + {0698, 'foo(?:aA|bB)?+(?:aA|bB)', 'fooaAb', FALSE}, + {0699, 'foo(?:aA)++b', 'fooaAaAaAaAaAb', TRUE}, + {0700, 'foo(aA)++b', 'fooaAaAaAaAaAb', TRUE}, + {0701, 'foo(aA|bB)++b', 'foobBaAbBaAbBb', TRUE}, + {0702, 'foo(?:aA|bB)++b', 'fooaAaAbBaAaAb', TRUE}, + {0703, 'foo(?:aA)*+b', 'fooaAaAaAaAaAb', TRUE}, + {0704, 'foo(aA)*+b', 'fooaAaAaAaAaAb', TRUE}, + {0705, 'foo(aA|bB)*+b', 'foobBbBaAaAaAb', TRUE}, + {0706, 'foo(?:aA|bB)*+b', 'foobBaAaAbBaAb', TRUE}, + {0707, 'foo(?:aA){1,5}+b', 'fooaAaAaAaAaAb', TRUE}, + {0708, 'foo(aA){1,5}+b', 'fooaAaAaAaAaAb', TRUE}, + {0709, 'foo(aA|bB){1,5}+b', 'foobBaAaAaAaAb', TRUE}, + {0710, 'foo(?:aA|bB){1,5}+b', 'fooaAbBaAbBbBb', TRUE}, + {0711, 'foo(?:aA)?+b', 'fooaAb', TRUE}, + {0712, 'foo(aA)?+b', 'fooaAb', TRUE}, + {0713, 'foo(aA|bB)?+b', 'foobBb', TRUE}, + {0714, 'foo(?:aA|bB)?+b', 'foobBb', TRUE}, + {0715, '([^()]++|\\([^()]*\\))+', '((abc(ade)ufh()()x', TRUE}, + {0716, 'round\\(([^()]++)\\)', '_I(round(xs * sz),1)', TRUE}, + {0717, '(foo[1x]|bar[2x]|baz[3x])+y', 'foo1bar2baz3y', TRUE}, + {0718, '(foo[1x]|bar[2x]|baz[3x])*y', 'foo1bar2baz3y', TRUE}, + {0719, '([yX].|WORDS|[yX].|WORD)S', 'WORDS', TRUE}, + {0720, '([yX].|WORDS|WORD|[xY].)S', 'WORDS', TRUE}, + {0721, '(foo|fool|[zx].|money|parted)$', 'fool', TRUE}, + {0722, '([zx].|foo|fool|[zq].|money|parted|[yx].)$', 'fool', TRUE}, + {0723, '(foo|fool|[zx].|money|parted)$', 'fools', FALSE}, + {0724, '([zx].|foo|fool|[qx].|money|parted|[py].)$', 'fools', FALSE}, + {0725, '([yX].|WORDS|[yX].|WORD)+S', 'WORDS', TRUE}, + {0726, '(WORDS|WORLD|WORD)+S', 'WORDS', TRUE}, + {0727, '([yX].|WORDS|WORD|[xY].)+S', 'WORDS', TRUE}, + {0728, '(foo|fool|[zx].|money|parted)+$', 'fool', TRUE}, + {0729, '([zx].|foo|fool|[zq].|money|parted|[yx].)+$', 'fool', TRUE}, + {0730, '(foo|fool|[zx].|money|parted)+$', 'fools', FALSE}, + {0731, '([zx].|foo|fool|[qx].|money|parted|[py].)+$', 'fools', FALSE}, + {0732, '(x|y|z[QW])+(longish|loquatious|excessive|overblown[QW])+', 'xyzQzWlongishoverblownW', TRUE}, + {0733, '(x|y|z[QW])*(longish|loquatious|excessive|overblown[QW])*', 'xyzQzWlongishoverblownW', TRUE}, + {0734, '(x|y|z[QW]){1,5}(longish|loquatious|excessive|overblown[QW]){1,5}', 'xyzQzWlongishoverblownW', TRUE}, + {0735, '(x|y|z[QW])++(longish|loquatious|excessive|overblown[QW])++', 'xyzQzWlongishoverblownW', TRUE}, + {0736, '(x|y|z[QW])*+(longish|loquatious|excessive|overblown[QW])*+', 'xyzQzWlongishoverblownW', TRUE}, + {0737, '(x|y|z[QW]){1,5}+(longish|loquatious|excessive|overblown[QW]){1,5}+', 'xyzQzWlongishoverblownW', TRUE}, + {0738, 'a*(?!)', 'aaaab', FALSE}, + {0739, 'a*(*FAIL)', 'aaaab', FALSE}, + {0740, 'a*(*F)', 'aaaab', FALSE}, + {0741, '(A(A|B(*ACCEPT)|C)D)(E)', 'AB', TRUE}, + {0742, '(A(A|B(*ACCEPT)|C)D)(E)', 'ACDE', TRUE}, + {0743, '(a)(?:(?-1)|(?+1))(b)', 'aab', TRUE}, + {0744, '(a)(?:(?-1)|(?+1))(b)', 'abb', TRUE}, + {0745, '(a)(?:(?-1)|(?+1))(b)', 'acb', FALSE}, + {0746, '(foo)(\\g-2)', 'foofoo', TRUE}, + {0747, '(foo)(\\g-2)(foo)(\\g-2)', 'foofoofoofoo', TRUE}, + {0748, '(([abc]+) \\g-1)(([abc]+) \\g{-1})', 'abc abccba cba', TRUE}, + {0749, '(a)(b)(c)\\g1\\g2\\g3', 'abcabc', TRUE}, + {0750, '(?<=bar>)foo', 'bar>foo', TRUE}, + {0751, '(?)foo', 'bar>foo', FALSE}, + {0752, '(?<=bar>ABC)foo', 'bar>ABCfoo', TRUE}, + {0753, '(?ABC)foo', 'bar>ABCfoo', FALSE}, + {0754, '(?)foo', 'bar>ABCfoo', TRUE}, + {0755, '(?ABC)foo', 'bar>ABCfoo', TRUE}, + {0756, '(?<=abcd(?<=(aaaabcd)))', '..aaaabcd..', TRUE}, + {0757, '(?=xy(?<=(aaxy)))', '..aaxy..', TRUE}, + {0758, 'X(\\w+)(?=\\s)|X(\\w+)', 'Xab', TRUE}, + {0759, '(?|(a))', 'a', TRUE}, + {0760, '(?|a(.)b|d(.(o).)d|i(.)(.)j)(.)', 'd!o!da', TRUE}, + {0761, '(?|a(.)b|d(.(o).)d|i(.)(.)j)(.)', 'aabc', TRUE}, + {0762, '(?|a(.)b|d(.(o).)d|i(.)(.)j)(.)', 'ixyjp', TRUE}, + {0763, '(?|(?|(a)|(b))|(?|(c)|(d)))', 'a', TRUE}, + {0764, '(?|(?|(a)|(b))|(?|(c)|(d)))', 'b', TRUE}, + {0765, '(?|(?|(a)|(b))|(?|(c)|(d)))', 'c', TRUE}, + {0766, '(?|(?|(a)|(b))|(?|(c)|(d)))', 'd', TRUE}, + {0767, '(.)(?|(.)(.)x|(.)d)(.)', 'abcde', TRUE}, + {0768, '(\n)(?|(\n)(\n)x|(\n)d)(\n)', 'abcde', FALSE}, + {0769, '(?|(?x))', 'x', TRUE}, + {0770, '(?)(?|(?x))', 'x', TRUE}, + {0771, '(?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a))', 'a', TRUE}, + {0772, '(?(DEFINE)(?(?&B)+)(?a))(?&A)', 'a', TRUE}, + {0773, '(?(DEFINE)(?(?&B)+)(?a))(?&A)', 'aa', TRUE}, + {0774, 'foo(\r)bar', 'foo\r\nbar', TRUE}, + {0775, 'foo(\r)bar', 'foo\nbar', TRUE}, + {0776, 'foo(\r)bar', 'foo\rbar', TRUE}, + {0777, 'foo(\r+)bar', 'foo\r\n\\x{85}\r\n\nbar', TRUE}, + {0778, '(\\V+)(\r)', 'foo\r\n\\x{85}\r\n\nbar', TRUE}, + {0779, '(\r+)(\\V)', 'foo\r\n\\x{85}\r\n\nbar', TRUE}, + {0780, 'foo(\r)bar', 'foo\\x{85}bar', TRUE}, + {0781, '(\\V)(\r)', 'foo\\x{85}bar', TRUE}, + {0782, '(\r)(\\V)', 'foo\\x{85}bar', TRUE}, + {0783, '(\\V)(\r)', 'foo\r\nbar', TRUE}, + {0784, '(\r)(\\V)', 'foo\r\nbar', TRUE}, + {0785, '(\\V)(\r)', 'foo\rbar', TRUE}, + {0786, '(\r)(\\V)', 'foo\rbar', TRUE}, + {0787, '0|\r??\n0', '\n\n', FALSE}, + {0788, 'foo(\\v+)bar', 'foo\r\n\\x{85}\r\n\nbar', TRUE}, + {0789, '(\\v+)(\\V)', 'foo\r\n\\x{85}\r\n\nbar', TRUE}, + {0790, 'foo(\\v)bar', 'foo\\x{85}bar', TRUE}, + {0791, '(\\v)(\\V)', 'foo\\x{85}bar', TRUE}, + {0792, 'foo(\\v)bar', 'foo\rbar', TRUE}, + {0793, '(\\v)(\\V)', 'foo\rbar', TRUE}, + {0794, 'foo(\\h+)bar', 'foo\t\\x{A0}bar', TRUE}, + {0795, '(\\h+)(\\H)', 'foo\t\\x{A0}bar', TRUE}, + {0796, 'foo(\\h)bar', 'foo\\x{A0}bar', TRUE}, + {0797, '(\\h)(\\H)', 'foo\\x{A0}bar', TRUE}, + {0798, 'foo(\\h)bar', 'foo\tbar', TRUE}, + {0799, '(\\h)(\\H)', 'foo\tbar', TRUE}, + {0800, '.*\\z', 'foo\n', TRUE}, + {0801, '\n*\\z', 'foo\n', TRUE}, + {0802, '^(?:(\\d)x)?\\d$', '1', TRUE}, + {0803, '.*?(?:(\\w)|(\\w))x', 'abx', TRUE}, + {0804, '0{50}', '000000000000000000000000000000000000000000000000000', TRUE}, + {0805, '^a?(?=b)b', 'ab', TRUE}, + {0806, '^a*(?=b)b', 'ab', TRUE}, + {0807, '[\\s][\\S]', '\\x{a0}\\x{a0}', FALSE}, + {0808, 'abc\n\\{U+BEEF\\}', 'abc.{UBEEF}', TRUE}, + {0809, 'abc\n', 'abcd', TRUE}, + {0810, 'abc\n', 'abc\n', FALSE}, + {0811, '\\c@', '\\0', FALSE}, + {0812, '\\cA', '\\001', FALSE}, + {0813, '\\cB', '\\002', FALSE}, + {0814, '\\cC', '\\003', FALSE}, + {0815, '\\cI', '\\011', FALSE}, + {0816, '\\cJ', '\\012', FALSE}, + {0817, '\\cR', '\\022', FALSE}, + {0818, '\\cS', '\\023', FALSE}, + {0819, '\\cX', '\\030', FALSE}, + {0820, '\\cY', '\\031', FALSE}, + {0821, '\\cZ', '\\032', FALSE}, + {0822, '\\c[', '\\033', FALSE}, + {0823, '\\c\\X', '\\034X', FALSE}, + {0824, '\\c]', '\\035', FALSE}, + {0825, '\\c^', '\\036', FALSE}, + {0826, '\\c_', '\\037', FALSE}, + {0827, '\\o{120}', '\\x{50}', TRUE}, + {0828, '[a\\o{120}]', '\\x{50}', TRUE}, + {0829, '[\\006]', '\\006', TRUE}, + {0830, '[\\006]', '6\\000', FALSE}, + {0831, '[\\0005]', '\\0005', TRUE}, + {0832, '[\\0005]', '5\\000', TRUE}, + {0833, '[\\_]', '_', TRUE}, + {0834, '(q1|.)*(q2|.)*(x(a|bc)*y){2,}', 'xayxay', TRUE}, + {0835, '(q1|.)*(q2|.)*(x(a|bc)*y){2,3}', 'xayxay', TRUE}, + {0836, '(q1|z)*(q2|z)*z{15}-.*?(x(a|bc)*y){2,3}Z', 'zzzzzzzzzzzzzzzz-xayxayxayxayZ', TRUE}, + {0837, '(?:(?:)foo|bar|zot|rt78356)', 'foo', TRUE}, + {0838, '^m?(\\S)(.*)\\1$', 'aba', TRUE}, + {0839, '^m?(\\S)(.*)\\1$', '\tb\t', FALSE}, + {0840, '^m?(\\s)(.*)\\1$', '\tb\t', TRUE}, + {0841, '^m?(\\s)(.*)\\1$', 'aba', FALSE}, + {0842, '^m?(\\W)(.*)\\1$', ':b:', TRUE}, + {0843, '^m?(\\W)(.*)\\1$', 'aba', FALSE}, + {0844, '^m?(\\w)(.*)\\1$', 'aba', TRUE}, + {0845, '^m?(\\w)(.*)\\1$', ':b:', FALSE}, + {0846, '^m?(\\D)(.*)\\1$', 'aba', TRUE}, + {0847, '^m?(\\D)(.*)\\1$', '5b5', FALSE}, + {0848, '^m?(\\d)(.*)\\1$', '5b5', TRUE}, + {0849, '^m?(\\d)(.*)\\1$', 'aba', FALSE}, + {0850, '^_?[^\\W_0-9]\\w\\z', '\\xAA\\x{100}', TRUE}, + {0851, '(?#( (?{1+)a', 'a', TRUE}, + {0852, 'ab[(?{1]', 'ab1', TRUE}, + {0853, 'ab[(?{1\\](?{2]', 'ab2', TRUE}, + {0854, '[^\\p{Alphabetic}]', '\\x{100}', FALSE}, + {0855, '^(.)(?:(..)|B)[CX]', 'ABCDE', TRUE}, + {0856, '^(.)(?:BC(.)|B)[CX]', 'ABCDE', TRUE}, + {0857, '^(.)(?:(.)+)*[BX]', 'ABCDE', TRUE}, + {0858, '^(.)(BC)*', 'ABCDE', TRUE}, + {0859, '^(.)(BC)*[BX]', 'ABCDE', TRUE}, + {0860, '^(.)(B)*.[DX]', 'ABCDE', TRUE}, + {0861, '^(.)(B)*.[CX]', 'ABCDE', TRUE}, + {0862, '^(?:(X)?(\\d)|(X)?(\\d\\d))$', 'X12', TRUE}, + {0863, '^(?:(XX)?(\\d)|(XX)?(\\d\\d))$', 'XX12', TRUE}, + {0864, '\\A(?>\\[(?:(?:)(?:R){1}|T|V?|A)\\])\\z', '[A]', TRUE}, + {0865, '[^\n]+', '\nb', TRUE}, + {0866, '[^\n]+', 'a\n', TRUE}, + {0867, '\\w', '\\x{200C}', TRUE}, + {0868, '\\W', '\\x{200C}', FALSE}, + {0869, '\\w', '\\x{200D}', TRUE}, + {0870, '\\W', '\\x{200D}', FALSE}, + {0871, '^\r{2}$', '\r\n\r\n', TRUE}, + {0872, '\\Vn', '\\xFFn/', TRUE}, + {0873, '^_?[^\\S_0-9]\\w*\\z', '\t', TRUE}, + {0874, 'a?\\X', 'a\\x{100}', TRUE}, + {0875, 'a?\r', 'a\n', TRUE}, + {0876, '^a?\n$', 'a\n', TRUE}, + {0877, '\n?a', '\na', TRUE}, + {0878, '(A(*PRUNE)B|A(*PRUNE)C)', 'AC', FALSE}, + {0879, '(A(*PRUNE)B|A(*PRUNE)D|A(*PRUNE)C)', 'AC', FALSE}, + {0880, '(A(*PRUNE)B|A(*PRUNE)C|A(*PRUNE)D)', 'AC', FALSE}, + {0881, '((A(*PRUNE)B|A(*PRUNE)C))', 'AC', FALSE}, + {0882, '((A(*PRUNE)B|A(*PRUNE)D|A(*PRUNE)C))', 'AC', FALSE}, + {0883, '((A(*PRUNE)B|A(*PRUNE)C|A(*PRUNE)D))', 'AC', FALSE}, + {0884, 'A+?(*THEN)BC', 'AAABC', TRUE}, + {0885, 'A+?(*PRUNE)BC', 'AAABC', TRUE}, + {0886, 'A+(*THEN)BC', 'AAABC', TRUE}, + {0887, 'A+(*PRUNE)BC', 'AAABC', TRUE}, + {0888, '^(?=(a)){0}b(?1)', 'back', TRUE}, + {0889, '(?:(a(*SKIP)b)){0}(?:(?1)|ac)', 'x', FALSE}, + {0890, '(?1)(?:(b)){0}', 'b', TRUE}, + {0891, '(?a)(?(?=(?&W))(?<=(?&W)))(?&BB)', 'aa', TRUE}, + {0892, '^x?abc?de', 'abcde', TRUE}, + {0895, '\\d<(.*?)>', 'a<>', FALSE}, + {0896, '[bcd].{2,3}aaaa', 'XbXaaaaa', TRUE}, + {0897, '[bcd].{2,3}aaaa', 'Xb\\x{100}aaaaa', TRUE}, + {0899, '^((?(?=x)xb|ya)z)', 'xbz', TRUE}, + {0900, '^((?(?=x)xb|ya)z)', 'yaz', TRUE}, + {0901, '^((?(?!y)xb|ya)z)', 'xbz', TRUE}, + {0902, '^((?(?!y)xb|ya)z)', 'yaz', TRUE}, + {0903, '^((?(?!)xb|ya)z)', 'xbz', FALSE}, + {0904, '^((?(?!)xb|ya)z)', 'yaz', TRUE}, + {0905, 'ab(?#Comment){2}c', 'abbc', TRUE}, + {0906, '(?:.||)(?|)000000000@', '000000000@', TRUE}, + {0907, 'aa$|a(?R)a|a', 'aaa', TRUE}, + {0908, '(?:\\1|a)([bcd])\\1(?:(?R)|e)\\1', 'abbaccaddedcb', TRUE}, + {0909, '(.*?(a(a)|i(i))n)', 'riiaan', TRUE}, + {0910, '(^(?:(\\d)x)?\\d$)', '1', TRUE}, + {0911, '(X{2,}[-X]{1,4}){3,}X{2,}', 'XXX-XXX-XXX--', FALSE}, + {0912, '^a?bcd\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', FALSE}, + {0913, '^Xaaa?Xaa', 'aaa\\x{400000}', FALSE}, + {0914, '^(\\d+)*?4X$', '1234X', TRUE}, + {0915, '\\A([\\x00-\\x7F]+)(.*)\\z', '\\007\\011\\012', TRUE}, + {0916, '^((\\w|<(\\s)*(?1)(?3)*>)(?:(?3)*\\+(?3)*(?2))*)(?3)*\\+', 'a + b + ', TRUE}, + {0917, '^((\\w|<(\\s)*(?1)(?3)*>)(?:(?3)*\\+(?3)*(?2))*)(?3)*\\+', 'a + + c', TRUE}, + {0918, '(?<=(?= MIN_PASS_PERCENTAGE; +resultStr := IF(isSuccess, 'PASSED', 'FAILED'); +fullResultStr := resultStr + ': ' + (STRING)(ROUND(passedPercentage * 100, 2)); + +// Output for unit test parsing +OUTPUT(resultStr, NAMED('result')); + +// Uncomment the following to see details +// OUTPUT(numTests, NAMED('num_tests')); +// OUTPUT(numTestsPassed, NAMED('num_passed')); +// OUTPUT(numTestsFailed, NAMED('num_failed')); +// OUTPUT(fullResultStr, NAMED('result_desc')); +// OUTPUT(testsFailed, NAMED('failed_tests'), ALL); diff --git a/testing/regress/ecl/regex_patterns_utf8_1.ecl b/testing/regress/ecl/regex_patterns_utf8_1.ecl new file mode 100644 index 00000000000..ad3eca589fd --- /dev/null +++ b/testing/regress/ecl/regex_patterns_utf8_1.ecl @@ -0,0 +1,906 @@ +/*############################################################################## + + HPCC SYSTEMS software Copyright (C) 2024 HPCC Systems®. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +############################################################################## */ + +//Tests derived from the python3 test suite + +#OPTION('globalFold', FALSE); + +regexTests := DATASET + ( + [ + {0001, U8'abc', U8'abc', TRUE}, + {0002, U8'abc', U8'xbc', FALSE}, + {0003, U8'abc', U8'axc', FALSE}, + {0004, U8'abc', U8'abx', FALSE}, + {0005, U8'abc', U8'xabcy', TRUE}, + {0006, U8'abc', U8'ababc', TRUE}, + {0007, U8'ab*c', U8'abc', TRUE}, + {0008, U8'ab*bc', U8'abc', TRUE}, + {0009, U8'ab*bc', U8'abbc', TRUE}, + {0010, U8'ab*bc', U8'abbbbc', TRUE}, + {0011, U8'.{1}', U8'abbbbc', TRUE}, + {0012, U8'.{3,4}', U8'abbbbc', TRUE}, + {0013, U8'ab{0,}bc', U8'abbbbc', TRUE}, + {0014, U8'ab+bc', U8'abbc', TRUE}, + {0015, U8'ab+bc', U8'abc', FALSE}, + {0016, U8'ab+bc', U8'abq', FALSE}, + {0017, U8'ab{1,}bc', U8'abq', FALSE}, + {0018, U8'ab+bc', U8'abbbbc', TRUE}, + {0019, U8'ab{1,}bc', U8'abbbbc', TRUE}, + {0020, U8'ab{1,3}bc', U8'abbbbc', TRUE}, + {0021, U8'ab{3,4}bc', U8'abbbbc', TRUE}, + {0022, U8'ab{4,5}bc', U8'abbbbc', FALSE}, + {0023, U8'ab?bc', U8'abbc', TRUE}, + {0024, U8'ab?bc', U8'abc', TRUE}, + {0025, U8'ab{0,1}bc', U8'abc', TRUE}, + {0026, U8'ab?bc', U8'abbbbc', FALSE}, + {0027, U8'ab?c', U8'abc', TRUE}, + {0028, U8'ab{0,1}c', U8'abc', TRUE}, + {0029, U8'^abc$', U8'abc', TRUE}, + {0030, U8'^abc$', U8'abcc', FALSE}, + {0031, U8'^abc', U8'abcc', TRUE}, + {0032, U8'^abc$', U8'aabc', FALSE}, + {0033, U8'abc$', U8'aabc', TRUE}, + {0034, U8'abc$', U8'aabcd', FALSE}, + {0035, U8'^', U8'abc', TRUE}, + {0036, U8'$', U8'abc', TRUE}, + {0037, U8'a.c', U8'abc', TRUE}, + {0038, U8'a.c', U8'axc', TRUE}, + {0039, U8'a\nc', U8'abc', FALSE}, + {0040, U8'a.*c', U8'axyzc', TRUE}, + {0041, U8'a\n*c', U8'axyzc', FALSE}, + {0042, U8'a.*c', U8'axyzd', FALSE}, + {0043, U8'a\n*c', U8'axyzd', FALSE}, + {0044, U8'a[bc]d', U8'abc', FALSE}, + {0045, U8'a[bc]d', U8'abd', TRUE}, + {0046, U8'a[b]d', U8'abd', TRUE}, + {0047, U8'[a][b][d]', U8'abd', TRUE}, + {0048, U8'.[b].', U8'abd', TRUE}, + {0049, U8'.[b].', U8'aBd', FALSE}, + {0050, U8'(?i:.[b].)', U8'abd', TRUE}, + {0051, U8'(?i:\n[b]\n)', U8'abd', FALSE}, + {0052, U8'a[b-d]e', U8'abd', FALSE}, + {0053, U8'a[b-d]e', U8'ace', TRUE}, + {0054, U8'a[b-d]', U8'aac', TRUE}, + {0055, U8'a[-b]', U8'a-', TRUE}, + {0056, U8'a[b-]', U8'a-', TRUE}, + {0057, U8'a]', U8'a]', TRUE}, + {0058, U8'a[]]b', U8'a]b', TRUE}, + {0059, U8'a[^bc]d', U8'aed', TRUE}, + {0060, U8'a[^bc]d', U8'abd', FALSE}, + {0061, U8'a[^-b]c', U8'adc', TRUE}, + {0062, U8'a[^-b]c', U8'a-c', FALSE}, + {0063, U8'a[^]b]c', U8'a]c', FALSE}, + {0064, U8'a[^]b]c', U8'adc', TRUE}, + {0065, U8'\\ba\\b', U8'a-', TRUE}, + {0066, U8'\\ba\\b', U8'-a', TRUE}, + {0067, U8'\\ba\\b', U8'-a-', TRUE}, + {0068, U8'\\by\\b', U8'xy', FALSE}, + {0069, U8'\\by\\b', U8'yz', FALSE}, + {0070, U8'\\by\\b', U8'xyz', FALSE}, + {0071, U8'\\Ba\\B', U8'a-', FALSE}, + {0072, U8'\\Ba\\B', U8'-a', FALSE}, + {0073, U8'\\Ba\\B', U8'-a-', FALSE}, + {0074, U8'\\By\\b', U8'xy', TRUE}, + {0075, U8'\\by\\B', U8'yz', TRUE}, + {0076, U8'\\By\\B', U8'xyz', TRUE}, + {0077, U8'\\w', U8'a', TRUE}, + {0078, U8'\\w', U8'-', FALSE}, + {0079, U8'\\W', U8'a', FALSE}, + {0080, U8'\\W', U8'-', TRUE}, + {0081, U8'a\\sb', U8'a b', TRUE}, + {0082, U8'a\\sb', U8'a-b', FALSE}, + {0083, U8'a\\Sb', U8'a b', FALSE}, + {0084, U8'a\\Sb', U8'a-b', TRUE}, + {0085, U8'\\d', U8'1', TRUE}, + {0086, U8'\\d', U8'-', FALSE}, + {0087, U8'\\D', U8'1', FALSE}, + {0088, U8'\\D', U8'-', TRUE}, + {0089, U8'[\\w]', U8'a', TRUE}, + {0090, U8'[\\w]', U8'-', FALSE}, + {0091, U8'[\\W]', U8'a', FALSE}, + {0092, U8'[\\W]', U8'-', TRUE}, + {0093, U8'a[\\s]b', U8'a b', TRUE}, + {0094, U8'a[\\s]b', U8'a-b', FALSE}, + {0095, U8'a[\\S]b', U8'a b', FALSE}, + {0096, U8'a[\\S]b', U8'a-b', TRUE}, + {0097, U8'[\\d]', U8'1', TRUE}, + {0098, U8'[\\d]', U8'-', FALSE}, + {0099, U8'[\\D]', U8'1', FALSE}, + {0100, U8'[\\D]', U8'-', TRUE}, + {0101, U8'ab|cd', U8'abc', TRUE}, + {0102, U8'ab|cd', U8'abcd', TRUE}, + {0103, U8'()ef', U8'def', TRUE}, + {0104, U8'$b', U8'b', FALSE}, + {0105, U8'a\\(b', U8'a(b', TRUE}, + {0106, U8'a\\(*b', U8'ab', TRUE}, + {0107, U8'a\\(*b', U8'a((b', TRUE}, + {0109, U8'((a))', U8'abc', TRUE}, + {0110, U8'(a)b(c)', U8'abc', TRUE}, + {0111, U8'a+b+c', U8'aabbabc', TRUE}, + {0112, U8'a{1,}b{1,}c', U8'aabbabc', TRUE}, + {0113, U8'a.+?c', U8'abcabc', TRUE}, + {0114, U8'(a+|b)*', U8'ab', TRUE}, + {0115, U8'(a+|b){0,}', U8'ab', TRUE}, + {0116, U8'(a+|b)+', U8'ab', TRUE}, + {0117, U8'(a+|b){1,}', U8'ab', TRUE}, + {0118, U8'(a+|b)?', U8'ab', TRUE}, + {0119, U8'(a+|b){0,1}', U8'ab', TRUE}, + {0120, U8'[^ab]*', U8'cde', TRUE}, + {0121, U8'([abc])*d', U8'abbbcd', TRUE}, + {0122, U8'([abc])*bcd', U8'abcd', TRUE}, + {0123, U8'a|b|c|d|e', U8'e', TRUE}, + {0124, U8'(a|b|c|d|e)f', U8'ef', TRUE}, + {0125, U8'abcd*efg', U8'abcdefg', TRUE}, + {0126, U8'ab*', U8'xabyabbbz', TRUE}, + {0127, U8'ab*', U8'xayabbbz', TRUE}, + {0128, U8'(ab|cd)e', U8'abcde', TRUE}, + {0129, U8'[abhgefdc]ij', U8'hij', TRUE}, + {0130, U8'^(ab|cd)e', U8'abcde', FALSE}, + {0131, U8'(abc|)ef', U8'abcdef', TRUE}, + {0132, U8'(a|b)c*d', U8'abcd', TRUE}, + {0133, U8'(ab|ab*)bc', U8'abc', TRUE}, + {0134, U8'a([bc]*)c*', U8'abc', TRUE}, + {0135, U8'a([bc]*)(c*d)', U8'abcd', TRUE}, + {0136, U8'a([bc]+)(c*d)', U8'abcd', TRUE}, + {0137, U8'a([bc]*)(c+d)', U8'abcd', TRUE}, + {0138, U8'a[bcd]*dcdcde', U8'adcdcde', TRUE}, + {0139, U8'a[bcd]+dcdcde', U8'adcdcde', FALSE}, + {0140, U8'(ab|a)b*c', U8'abc', TRUE}, + {0141, U8'((a)(b)c)(d)', U8'abcd', TRUE}, + {0142, U8'[a-zA-Z_][a-zA-Z0-9_]*', U8'alpha', TRUE}, + {0143, U8'[_A-Z]', U8'}', FALSE}, + {0144, U8'^a(bc+|b[eh])g|.h$', U8'abh', TRUE}, + {0145, U8'(bc+d$|ef*g.|h?i(j|k))', U8'effgz', TRUE}, + {0146, U8'(bc+d$|ef*g.|h?i(j|k))', U8'ij', TRUE}, + {0147, U8'(bc+d$|ef*g.|h?i(j|k))', U8'effg', FALSE}, + {0148, U8'(bc+d$|ef*g.|h?i(j|k))', U8'bcdd', FALSE}, + {0149, U8'(bc+d$|ef*g.|h?i(j|k))', U8'reffgz', TRUE}, + {0150, U8'((((((((((a))))))))))', U8'a', TRUE}, + {0151, U8'((((((((((a))))))))))\\10', U8'aa', TRUE}, + {0154, U8'(((((((((a)))))))))', U8'a', TRUE}, + {0155, U8'[89]+', U8'1((((((7(9))))))', TRUE}, + {0156, U8'multiple words of text', U8'uh-uh', FALSE}, + {0157, U8'multiple words', U8'multiple words, yeah', TRUE}, + {0158, U8'(.*)c(.*)', U8'abcde', TRUE}, + {0159, U8'\\((.*), (.*)\\)', U8'(a, b)', TRUE}, + {0160, U8'[k]', U8'ab', FALSE}, + {0161, U8'abcd', U8'abcd', TRUE}, + {0162, U8'a(bc)d', U8'abcd', TRUE}, + {0163, U8'a[-]?c', U8'ac', TRUE}, + {0164, U8'(abc)\\1', U8'abcabc', TRUE}, + {0165, U8'([a-c]*)\\1', U8'abcabc', TRUE}, + {0166, U8'(a)|\\1', U8'a', TRUE}, + {0167, U8'(a)|\\1', U8'x', FALSE}, + {0168, U8'(?:(b)?a)\\1', U8'a', FALSE}, + {0169, U8'(([a-c])b*?\\2)*', U8'ababbbcbc', TRUE}, + {0170, U8'(([a-c])b*?\\2){3}', U8'ababbbcbc', TRUE}, + {0171, U8'((\\3|b)\\2(a)x)+', U8'aaxabxbaxbbx', FALSE}, + {0172, U8'((\\3|b)\\2(a)x)+', U8'aaaxabaxbaaxbbax', TRUE}, + {0173, U8'((\\3|b)\\2(a)){2,}', U8'bbaababbabaaaaabbaaaabba', TRUE}, + {0174, U8'^((.)?a\\2)+$', U8'babadad', FALSE}, + {0175, U8'(a)|(b)', U8'b', TRUE}, + {0176, U8'a(?!b).', U8'abad', TRUE}, + {0177, U8'a(?=d).', U8'abad', TRUE}, + {0178, U8'a(?=c|d).', U8'abad', TRUE}, + {0179, U8'a(?:b|c|d)(.)', U8'ace', TRUE}, + {0180, U8'a(?:b|c|d)*(.)', U8'ace', TRUE}, + {0181, U8'a(?:b|c|d)+?(.)', U8'ace', TRUE}, + {0182, U8'a(?:b|c|d)+?(.)', U8'acdbcdbe', TRUE}, + {0183, U8'a(?:b|c|d)+(.)', U8'acdbcdbe', TRUE}, + {0184, U8'a(?:b|c|d){2}(.)', U8'acdbcdbe', TRUE}, + {0185, U8'a(?:b|c|d){4,5}(.)', U8'acdbcdbe', TRUE}, + {0186, U8'a(?:b|c|d){4,5}?(.)', U8'acdbcdbe', TRUE}, + {0187, U8'((foo)|(bar))*', U8'foobar', TRUE}, + {0188, U8'a(?:b|c|d){6,7}(.)', U8'acdbcdbe', TRUE}, + {0189, U8'a(?:b|c|d){6,7}?(.)', U8'acdbcdbe', TRUE}, + {0190, U8'a(?:b|c|d){5,6}(.)', U8'acdbcdbe', TRUE}, + {0191, U8'a(?:b|c|d){5,6}?(.)', U8'acdbcdbe', TRUE}, + {0192, U8'a(?:b|c|d){5,7}(.)', U8'acdbcdbe', TRUE}, + {0193, U8'a(?:b|c|d){5,7}?(.)', U8'acdbcdbe', TRUE}, + {0194, U8'a(?:b|(c|e){1,2}?|d)+?(.)', U8'ace', TRUE}, + {0195, U8'^(.+)?B', U8'AB', TRUE}, + {0196, U8'^([^a-z])|(\\^)$', U8'.', TRUE}, + {0197, U8'^[<>]&', U8'<&OUT', TRUE}, + {0198, U8'^(a\\1?){4}$', U8'aaaaaaaaaa', TRUE}, + {0199, U8'^(a\\1?){4}$', U8'aaaaaaaaa', FALSE}, + {0200, U8'^(a\\1?){4}$', U8'aaaaaaaaaaa', FALSE}, + {0201, U8'^(a(?(1)\\1)){4}$', U8'aaaaaaaaaa', TRUE}, + {0202, U8'^(a(?(1)\\1)){4}$', U8'aaaaaaaaa', FALSE}, + {0203, U8'^(a(?(1)\\1)){4}$', U8'aaaaaaaaaaa', FALSE}, + {0204, U8'((?(1)a|b))+', U8'baaa', TRUE}, + {0205, U8'((?(1)aa|b))+', U8'baaaa', TRUE}, + {0206, U8'((a{4})+)', U8'aaaaaaaaa', TRUE}, + {0207, U8'(((aa){2})+)', U8'aaaaaaaaaa', TRUE}, + {0208, U8'(((a{2}){2})+)', U8'aaaaaaaaaa', TRUE}, + {0209, U8'(?:(f)(o)(o)|(b)(a)(r))*', U8'foobar', TRUE}, + {0210, U8'(?<=a)b', U8'ab', TRUE}, + {0211, U8'(?<=a)b', U8'cb', FALSE}, + {0212, U8'(?<=a)b', U8'b', FALSE}, + {0213, U8'(?a+)ab', U8'aaab', FALSE}, + {0285, U8'(?>a+)b', U8'aaab', TRUE}, + {0286, U8'([[:alpha:]]+)', U8'ABcd01Xy__-- ${nulnul}${ffff}', TRUE}, + {0287, U8'([[:alnum:]]+)', U8'ABcd01Xy__-- ${nulnul}${ffff}', TRUE}, + {0288, U8'([[:cntrl:]]+)', U8'ABcd01Xy__-- ${nulnul}${ffff}', TRUE}, + {0289, U8'([[:digit:]]+)', U8'ABcd01Xy__-- ${nulnul}${ffff}', TRUE}, + {0290, U8'([[:graph:]]+)', U8'ABcd01Xy__-- ${nulnul}${ffff}', TRUE}, + {0291, U8'([[:lower:]]+)', U8'ABcd01Xy__-- ${nulnul}${ffff}', TRUE}, + {0292, U8'([[:print:]]+)', U8'ABcd01Xy__-- ${nulnul}${ffff}', TRUE}, + {0293, U8'([[:punct:]]+)', U8'ABcd01Xy__-- ${nulnul}${ffff}', TRUE}, + {0294, U8'([[:space:]]+)', U8'ABcd01Xy__-- ${nulnul}${ffff}', TRUE}, + {0295, U8'([[:word:]]+)', U8'ABcd01Xy__-- ${nulnul}${ffff}', TRUE}, + {0296, U8'([[:upper:]]+)', U8'ABcd01Xy__-- ${nulnul}${ffff}', TRUE}, + {0297, U8'([[:xdigit:]]+)', U8'ABcd01Xy__-- ${nulnul}${ffff}', TRUE}, + {0298, U8'([[:^alpha:]]+)', U8'ABcd01Xy__-- ${nulnul}${ffff}', TRUE}, + {0299, U8'([[:^cntrl:]]+)', U8'ABcd01Xy__-- ${nulnul}${ffff}', TRUE}, + {0300, U8'([[:^digit:]]+)', U8'ABcd01Xy__-- ${nulnul}${ffff}', TRUE}, + {0301, U8'([[:^lower:]]+)', U8'ABcd01Xy__-- ${nulnul}${ffff}', TRUE}, + {0302, U8'([[:^punct:]]+)', U8'ABcd01Xy__-- ${nulnul}${ffff}', TRUE}, + {0303, U8'([[:^space:]]+)', U8'ABcd01Xy__-- ${nulnul}${ffff}', TRUE}, + {0304, U8'([[:^upper:]]+)', U8'ABcd01Xy__-- ${nulnul}${ffff}', TRUE}, + {0305, U8'([[:^xdigit:]]+)', U8'ABcd01Xy__-- ${nulnul}${ffff}', TRUE}, + {0307, U8'((?>a+)b)', U8'aaab', TRUE}, + {0308, U8'(?>(a+))b', U8'aaab', TRUE}, + {0309, U8'((?>[^()]+)|\\([^()]*\\))+', U8'((abc(ade)ufh()()x', TRUE}, + {0310, U8'\\z', U8'a\nb\n', TRUE}, + {0311, U8'$', U8'a\nb\n', TRUE}, + {0312, U8'\\z', U8'b\na\n', TRUE}, + {0313, U8'$', U8'b\na\n', TRUE}, + {0314, U8'\\z', U8'b\na', TRUE}, + {0315, U8'$', U8'b\na', TRUE}, + {0322, U8'a\\z', U8'a\nb\n', FALSE}, + {0323, U8'a$', U8'a\nb\n', FALSE}, + {0324, U8'a\\Z', U8'b\na\n', TRUE}, + {0325, U8'a\\z', U8'b\na\n', FALSE}, + {0326, U8'a$', U8'b\na\n', TRUE}, + {0327, U8'a\\z', U8'b\na', TRUE}, + {0328, U8'a$', U8'b\na', TRUE}, + {0336, U8'aa\\z', U8'aa\nb\n', FALSE}, + {0337, U8'aa$', U8'aa\nb\n', FALSE}, + {0338, U8'aa\\Z', U8'b\naa\n', TRUE}, + {0339, U8'aa\\z', U8'b\naa\n', FALSE}, + {0340, U8'aa$', U8'b\naa\n', TRUE}, + {0341, U8'aa\\z', U8'b\naa', TRUE}, + {0342, U8'aa$', U8'b\naa', TRUE}, + {0350, U8'aa\\z', U8'ac\nb\n', FALSE}, + {0351, U8'aa$', U8'ac\nb\n', FALSE}, + {0352, U8'aa\\z', U8'b\nac\n', FALSE}, + {0353, U8'aa$', U8'b\nac\n', FALSE}, + {0354, U8'aa\\z', U8'b\nac', FALSE}, + {0355, U8'aa$', U8'b\nac', FALSE}, + {0362, U8'aa\\z', U8'ca\nb\n', FALSE}, + {0363, U8'aa$', U8'ca\nb\n', FALSE}, + {0364, U8'aa\\z', U8'b\nca\n', FALSE}, + {0365, U8'aa$', U8'b\nca\n', FALSE}, + {0366, U8'aa\\z', U8'b\nca', FALSE}, + {0367, U8'aa$', U8'b\nca', FALSE}, + {0374, U8'ab\\z', U8'ab\nb\n', FALSE}, + {0375, U8'ab$', U8'ab\nb\n', FALSE}, + {0376, U8'ab\\Z', U8'b\nab\n', TRUE}, + {0377, U8'ab\\z', U8'b\nab\n', FALSE}, + {0378, U8'ab$', U8'b\nab\n', TRUE}, + {0379, U8'ab\\z', U8'b\nab', TRUE}, + {0380, U8'ab$', U8'b\nab', TRUE}, + {0388, U8'ab\\z', U8'ac\nb\n', FALSE}, + {0389, U8'ab$', U8'ac\nb\n', FALSE}, + {0390, U8'ab\\z', U8'b\nac\n', FALSE}, + {0391, U8'ab$', U8'b\nac\n', FALSE}, + {0392, U8'ab\\z', U8'b\nac', FALSE}, + {0393, U8'ab$', U8'b\nac', FALSE}, + {0400, U8'ab\\z', U8'ca\nb\n', FALSE}, + {0401, U8'ab$', U8'ca\nb\n', FALSE}, + {0402, U8'ab\\z', U8'b\nca\n', FALSE}, + {0403, U8'ab$', U8'b\nca\n', FALSE}, + {0404, U8'ab\\z', U8'b\nca', FALSE}, + {0405, U8'ab$', U8'b\nca', FALSE}, + {0412, U8'abb\\z', U8'abb\nb\n', FALSE}, + {0413, U8'abb$', U8'abb\nb\n', FALSE}, + {0414, U8'abb\\Z', U8'b\nabb\n', TRUE}, + {0415, U8'abb\\z', U8'b\nabb\n', FALSE}, + {0416, U8'abb$', U8'b\nabb\n', TRUE}, + {0417, U8'abb\\z', U8'b\nabb', TRUE}, + {0418, U8'abb$', U8'b\nabb', TRUE}, + {0426, U8'abb\\z', U8'ac\nb\n', FALSE}, + {0427, U8'abb$', U8'ac\nb\n', FALSE}, + {0428, U8'abb\\z', U8'b\nac\n', FALSE}, + {0429, U8'abb$', U8'b\nac\n', FALSE}, + {0430, U8'abb\\z', U8'b\nac', FALSE}, + {0431, U8'abb$', U8'b\nac', FALSE}, + {0438, U8'abb\\z', U8'ca\nb\n', FALSE}, + {0439, U8'abb$', U8'ca\nb\n', FALSE}, + {0440, U8'abb\\z', U8'b\nca\n', FALSE}, + {0441, U8'abb$', U8'b\nca\n', FALSE}, + {0442, U8'abb\\z', U8'b\nca', FALSE}, + {0443, U8'abb$', U8'b\nca', FALSE}, + {0451, U8'(^|x)(c)', U8'ca', TRUE}, + {0452, U8'a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz', U8'x', FALSE}, + {0453, U8'round\\(((?>[^()]+))\\)', U8'_I(round(xs * sz),1)', TRUE}, + {0456, U8'foo.bart', U8'foo.bart', TRUE}, + {0458, U8'tt+$', U8'xxxtt', TRUE}, + {0459, U8'\\GX.*X', U8'aaaXbX', FALSE}, + {0460, U8'(\\d+\\.\\d+)', U8'3.1415926', TRUE}, + {0461, U8'(\\ba.{0,10}br)', U8'have a web browser', TRUE}, + {0462, U8'^([a-z]:)', U8'C:/', FALSE}, + {0464, U8'(^|a)b', U8'ab', TRUE}, + {0465, U8'^([ab]*?)(b)?(c)$', U8'abac', TRUE}, + {0466, U8'(\\w)?(abc)\\1b', U8'abcab', FALSE}, + {0467, U8'^(?:.,){2}c', U8'a,b,c', TRUE}, + {0468, U8'^(.,){2}c', U8'a,b,c', TRUE}, + {0469, U8'^(?:[^,]*,){2}c', U8'a,b,c', TRUE}, + {0470, U8'^([^,]*,){2}c', U8'a,b,c', TRUE}, + {0471, U8'^([^,]*,){3}d', U8'aaa,b,c,d', TRUE}, + {0472, U8'^([^,]*,){3,}d', U8'aaa,b,c,d', TRUE}, + {0473, U8'^([^,]*,){0,3}d', U8'aaa,b,c,d', TRUE}, + {0474, U8'^([^,]{1,3},){3}d', U8'aaa,b,c,d', TRUE}, + {0475, U8'^([^,]{1,3},){3,}d', U8'aaa,b,c,d', TRUE}, + {0476, U8'^([^,]{1,3},){0,3}d', U8'aaa,b,c,d', TRUE}, + {0477, U8'^([^,]{1,},){3}d', U8'aaa,b,c,d', TRUE}, + {0478, U8'^([^,]{1,},){3,}d', U8'aaa,b,c,d', TRUE}, + {0479, U8'^([^,]{1,},){0,3}d', U8'aaa,b,c,d', TRUE}, + {0480, U8'^([^,]{0,3},){3}d', U8'aaa,b,c,d', TRUE}, + {0481, U8'^([^,]{0,3},){3,}d', U8'aaa,b,c,d', TRUE}, + {0482, U8'^([^,]{0,3},){0,3}d', U8'aaa,b,c,d', TRUE}, + {0484, U8'^(a(b)?)+$', U8'aba', TRUE}, + {0485, U8'^(aa(bb)?)+$', U8'aabbaa', TRUE}, + {0487, U8'^(a)?a$', U8'a', TRUE}, + {0488, U8'^(a)?(?(1)a|b)+$', U8'a', FALSE}, + {0489, U8'^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$', U8'aaaaaa', TRUE}, + {0490, U8'^(a\\1?){4}$', U8'aaaaaa', TRUE}, + {0491, U8'^(0+)?(?:x(1))?', U8'x1', TRUE}, + {0492, U8'^([0-9a-fA-F]+)(?:x([0-9a-fA-F]+)?)(?:x([0-9a-fA-F]+))?', U8'012cxx0190', TRUE}, + {0493, U8'^(b+?|a){1,2}c', U8'bbbac', TRUE}, + {0494, U8'^(b+?|a){1,2}c', U8'bbbbac', TRUE}, + {0495, U8'\\((\\w\\. \\w+)\\)', U8'cd. (A. Tw)', TRUE}, + {0496, U8'((?:aaaa|bbbb)cccc)?', U8'aaaacccc', TRUE}, + {0497, U8'((?:aaaa|bbbb)cccc)?', U8'bbbbcccc', TRUE}, + {0498, U8'(a)?(a)+', U8'a', TRUE}, + {0499, U8'(ab)?(ab)+', U8'ab', TRUE}, + {0500, U8'(abc)?(abc)+', U8'abc', TRUE}, + {0502, U8'\\ba', U8'a', TRUE}, + {0503, U8'ab(?i)cd', U8'AbCd', FALSE}, + {0504, U8'ab(?i)cd', U8'abCd', TRUE}, + {0505, U8'(A|B)*(?(1)(CD)|(CD))', U8'CD', TRUE}, + {0506, U8'(A|B)*(?(1)(CD)|(CD))', U8'ABCD', TRUE}, + {0507, U8'(A|B)*?(?(1)(CD)|(CD))', U8'CD', TRUE}, + {0508, U8'(A|B)*?(?(1)(CD)|(CD))', U8'ABCD', TRUE}, + {0509, U8'(.*)\\d+\\1', U8'abc12bc', TRUE}, + {0510, U8'(?m:(foo\\s*$))', U8'foo\n bar', TRUE}, + {0511, U8'(.*)c', U8'abcd', TRUE}, + {0512, U8'(.*)(?=c)', U8'abcd', TRUE}, + {0513, U8'(.*)(?=c)c', U8'abcd', TRUE}, + {0514, U8'(.*)(?=b|c)', U8'abcd', TRUE}, + {0515, U8'(.*)(?=b|c)c', U8'abcd', TRUE}, + {0516, U8'(.*)(?=c|b)', U8'abcd', TRUE}, + {0517, U8'(.*)(?=c|b)c', U8'abcd', TRUE}, + {0518, U8'(.*)(?=[bc])', U8'abcd', TRUE}, + {0519, U8'(.*)(?=[bc])c', U8'abcd', TRUE}, + {0520, U8'(.*)(?<=b)', U8'abcd', TRUE}, + {0521, U8'(.*)(?<=b)c', U8'abcd', TRUE}, + {0522, U8'(.*)(?<=b|c)', U8'abcd', TRUE}, + {0523, U8'(.*)(?<=b|c)c', U8'abcd', TRUE}, + {0524, U8'(.*)(?<=c|b)', U8'abcd', TRUE}, + {0525, U8'(.*)(?<=c|b)c', U8'abcd', TRUE}, + {0526, U8'(.*)(?<=[bc])', U8'abcd', TRUE}, + {0527, U8'(.*)(?<=[bc])c', U8'abcd', TRUE}, + {0528, U8'(.*?)c', U8'abcd', TRUE}, + {0529, U8'(.*?)(?=c)', U8'abcd', TRUE}, + {0530, U8'(.*?)(?=c)c', U8'abcd', TRUE}, + {0531, U8'(.*?)(?=b|c)', U8'abcd', TRUE}, + {0532, U8'(.*?)(?=b|c)c', U8'abcd', TRUE}, + {0533, U8'(.*?)(?=c|b)', U8'abcd', TRUE}, + {0534, U8'(.*?)(?=c|b)c', U8'abcd', TRUE}, + {0535, U8'(.*?)(?=[bc])', U8'abcd', TRUE}, + {0536, U8'(.*?)(?=[bc])c', U8'abcd', TRUE}, + {0537, U8'(.*?)(?<=b)', U8'abcd', TRUE}, + {0538, U8'(.*?)(?<=b)c', U8'abcd', TRUE}, + {0539, U8'(.*?)(?<=b|c)', U8'abcd', TRUE}, + {0540, U8'(.*?)(?<=b|c)c', U8'abcd', TRUE}, + {0541, U8'(.*?)(?<=c|b)', U8'abcd', TRUE}, + {0542, U8'(.*?)(?<=c|b)c', U8'abcd', TRUE}, + {0543, U8'(.*?)(?<=[bc])', U8'abcd', TRUE}, + {0544, U8'(.*?)(?<=[bc])c', U8'abcd', TRUE}, + {0545, U8'2(]*)?$\\1', U8'2', TRUE}, + {0546, U8'a(b)??', U8'abc', TRUE}, + {0547, U8'(\\d{1,3}\\.){3,}', U8'128.134.142.8', TRUE}, + {0548, U8'^.{3,4}(.+)\\1\\z', U8'foobarbar', TRUE}, + {0549, U8'^(?:f|o|b){3,4}(.+)\\1\\z', U8'foobarbar', TRUE}, + {0550, U8'^.{3,4}((?:b|a|r)+)\\1\\z', U8'foobarbar', TRUE}, + {0551, U8'^(?:f|o|b){3,4}((?:b|a|r)+)\\1\\z', U8'foobarbar', TRUE}, + {0552, U8'^.{3,4}(.+?)\\1\\z', U8'foobarbar', TRUE}, + {0553, U8'^(?:f|o|b){3,4}(.+?)\\1\\z', U8'foobarbar', TRUE}, + {0554, U8'^.{3,4}((?:b|a|r)+?)\\1\\z', U8'foobarbar', TRUE}, + {0555, U8'^(?:f|o|b){3,4}((?:b|a|r)+?)\\1\\z', U8'foobarbar', TRUE}, + {0556, U8'^.{2,3}?(.+)\\1\\z', U8'foobarbar', TRUE}, + {0557, U8'^(?:f|o|b){2,3}?(.+)\\1\\z', U8'foobarbar', TRUE}, + {0558, U8'^.{2,3}?((?:b|a|r)+)\\1\\z', U8'foobarbar', TRUE}, + {0559, U8'^(?:f|o|b){2,3}?((?:b|a|r)+)\\1\\z', U8'foobarbar', TRUE}, + {0560, U8'^.{2,3}?(.+?)\\1\\z', U8'foobarbar', TRUE}, + {0561, U8'^(?:f|o|b){2,3}?(.+?)\\1\\z', U8'foobarbar', TRUE}, + {0562, U8'^.{2,3}?((?:b|a|r)+?)\\1\\z', U8'foobarbar', TRUE}, + {0563, U8'^(?:f|o|b){2,3}?((?:b|a|r)+?)\\1\\z', U8'foobarbar', TRUE}, + {0564, U8'.*a(?!(b|cd)*e).*f', U8'......abef', FALSE}, + {0565, U8'(WORDS|WORD)S', U8'WORDS', TRUE}, + {0566, U8'(X.|WORDS|X.|WORD)S', U8'WORDS', TRUE}, + {0567, U8'(WORDS|WORLD|WORD)S', U8'WORDS', TRUE}, + {0568, U8'(X.|WORDS|WORD|Y.)S', U8'WORDS', TRUE}, + {0569, U8'(foo|fool|x.|money|parted)$', U8'fool', TRUE}, + {0570, U8'(x.|foo|fool|x.|money|parted|y.)$', U8'fool', TRUE}, + {0571, U8'(foo|fool|money|parted)$', U8'fool', TRUE}, + {0572, U8'(foo|fool|x.|money|parted)$', U8'fools', FALSE}, + {0573, U8'(x.|foo|fool|x.|money|parted|y.)$', U8'fools', FALSE}, + {0574, U8'(foo|fool|money|parted)$', U8'fools', FALSE}, + {0575, U8'(a|aa|aaa||aaaa|aaaaa|aaaaaa)(b|c)', U8'aaaaaaaaaaaaaaab', TRUE}, + {0576, U8'^(a*?)(?!(aa|aaaa)*$)', U8'aaaaaaaaaaaaaaaaaaaa', TRUE}, + {0577, U8'^(a*?)(?!(aa|aaaa)*$)(?=a\\z)', U8'aaaaaaaa', TRUE}, + {0578, U8'^(.)\\s+.$(?(1))', U8'A B', TRUE}, + {0579, U8'(?:r?)*?r|(.{2,4})', U8'abcde', TRUE}, + {0580, U8'(?!)+?|(.{2,4})', U8'abcde', TRUE}, + {0581, U8'^(a*?)(?!(a{6}|a{5})*$)', U8'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', TRUE}, + {0582, U8'^((?>(?:aa)?b)?)', U8'aab', TRUE}, + {0583, U8'^((?:aa)*)(?:X+((?:\\d+|-)(?:X+(.+))?))?$', U8'aaaaX5', TRUE}, + {0584, U8'X(A|B||C|D)Y', U8'XXXYYY', TRUE}, + {0585, U8'(?i:X([A]|[B]|y[Y]y|[D]|)Y)', U8'XXXYYYB', TRUE}, + {0586, U8'^([a]{1})*$', U8'aa', TRUE}, + {0587, U8'a(?!b(?!c))(..)', U8'abababc', TRUE}, + {0588, U8'a(?!b(?=a))(..)', U8'abababc', TRUE}, + {0589, U8'a(?!b(?!c(?!d(?!e))))...(.)', U8'abxabcdxabcde', TRUE}, + {0590, U8'X(?!b+(?!(c+)*(?!(c+)*d))).*X', U8'aXbbbbbbbcccccccccccccaaaX', TRUE}, + {0591, U8'^(XXXXXXXXXX|YYYYYYYYYY|Z.Q*X|Z[TE]Q*P):', U8'ZEQQQQQQQQQQQQQQQQQQP:', TRUE}, + {0592, U8'^(XXXXXXXXXX|YYYYYYYYYY|Z.Q*X|Z[TE]Q*P):', U8'ZEQQQX:', TRUE}, + {0593, U8'^([TUV]+|XXXXXXXXXX|YYYYYYYYYY|Z.Q*X|Z[TE]Q*P):', U8'ZEQQQQQQQQQQQQQQQQQQP:', TRUE}, + {0594, U8'^([TUV]+|XXXXXXXXXX|YYYYYYYYYY|Z.Q*X|Z[TE]Q*P):', U8'ZEQQQX:', TRUE}, + {0595, U8'^([TUV]+|XXXXXXXXXX|YYYYYYYYYY|Z.Q*X|Z[TE]Q*P|[MKJ]):', U8'ZEQQQQQQQQQQQQQQQQQQP:', TRUE}, + {0596, U8'^([TUV]+|XXXXXXXXXX|YYYYYYYYYY|Z.Q*X|Z[TE]Q*P|[MKJ]):', U8'ZEQQQX:', TRUE}, + {0597, U8'^(XXX|YYY|Z.Q*X|Z[TE]Q*P):', U8'ZEQQQQQQQQQQQQQQQQQQP:', TRUE}, + {0598, U8'^(XXX|YYY|Z.Q*X|Z[TE]Q*P):', U8'ZEQQQX:', TRUE}, + {0599, U8'^([TUV]+|XXX|YYY|Z.Q*X|Z[TE]Q*P):', U8'ZEQQQQQQQQQQQQQQQQQQP:', TRUE}, + {0600, U8'^([TUV]+|XXX|YYY|Z.Q*X|Z[TE]Q*P):', U8'ZEQQQX:', TRUE}, + {0601, U8'^([TUV]+|XXX|YYY|Z.Q*X|Z[TE]Q*P|[MKJ]):', U8'ZEQQQQQQQQQQQQQQQQQQP:', TRUE}, + {0602, U8'^([TUV]+|XXX|YYY|Z.Q*X|Z[TE]Q*P|[MKJ]):', U8'ZEQQQX:', TRUE}, + {0603, U8'X(?:ABCF[cC]x*|ABCD|ABCF):(?:DIT|DID|DIM)', U8'XABCFCxxxxxxxxxx:DIM', TRUE}, + {0604, U8'(((ABCD|ABCE|ABCF)))(A|B|C[xy]*):', U8'ABCFCxxxxxxxxxx:DIM', TRUE}, + {0605, U8'(?=foo)', U8'foo', TRUE}, + {0606, U8'(?=foo)', U8'XfooY', TRUE}, + {0607, U8'.*(?=foo)', U8'XfooY', TRUE}, + {0608, U8'(?=.*P)P', U8'aP', TRUE}, + {0609, U8'(?<=foo)', U8'foo', TRUE}, + {0610, U8'(?<=foo)', U8'XfooY', TRUE}, + {0611, U8'.*(?<=foo)', U8'foo', TRUE}, + {0612, U8'.*(?<=foo)', U8'XfooY', TRUE}, + {0613, U8'(?<=foo)Y', U8'XfooY', TRUE}, + {0614, U8'o(?<=foo)Y', U8'..XfooY..', TRUE}, + {0615, U8'X(?=foo)f', U8'..XfooY..', TRUE}, + {0616, U8'X(?=foo)', U8'..XfooY..', TRUE}, + {0617, U8'X(?<=foo.)[YZ]', U8'..XfooXY..', TRUE}, + {0618, U8'(?=XY*foo)', U8'Xfoo', TRUE}, + {0619, U8'^(?=XY*foo)', U8'Xfoo', TRUE}, + {0620, U8'^(<(?:[^<>]+|(?3)|(?1))*>)()(!>!>!>)$', U8'<!>!>><>>!>!>!>', TRUE}, + {0621, U8'^(<(?:[^<>]+|(?1))*>)$', U8'<<><<<><>>>>', TRUE}, + {0622, U8'((?2)*)([fF]o+)', U8'fooFoFoo', TRUE}, + {0623, U8'(<(?:[^<>]+|(?R))*>)', U8'<<><<<><>>>>', TRUE}, + {0624, U8'(?foo|bar|baz)', U8'snofooewa', TRUE}, + {0625, U8'(?foo|bar|baz)(?[ew]+)', U8'snofooewa', TRUE}, + {0626, U8'(?foo)?(?()bar|nada)', U8'foobar', TRUE}, + {0627, U8'(?foo)?(?()bar|nada)', U8'foo-barnada', TRUE}, + {0628, U8'(?foo)?(?(1)bar|nada)', U8'foo-barnada', TRUE}, + {0629, U8'(?foo(?(R)bar))?(?1)', U8'foofoobar', TRUE}, + {0630, U8'(x)(?foo(?(R&A)bar))?(?&A)', U8'xfoofoobar', TRUE}, + {0631, U8'(x)(?foo(?(R2)bar))?(?&A)', U8'xfoofoobar', TRUE}, + {0632, U8'(?1)(?(DEFINE)(blah))', U8'blah', TRUE}, + {0633, U8'foo(?0)?bar', U8'phoofoofoobarbarbarr', TRUE}, + {0634, U8'foo(?R)?bar', U8'phoofoofoobarbarbarr', TRUE}, + {0635, U8'a++a', U8'aaaaa', FALSE}, + {0636, U8'a*+a', U8'aaaaa', FALSE}, + {0637, U8'a{1,5}+a', U8'aaaaa', FALSE}, + {0638, U8'a?+a', U8'ab', FALSE}, + {0639, U8'a++b', U8'aaaaab', TRUE}, + {0640, U8'a*+b', U8'aaaaab', TRUE}, + {0641, U8'a{1,5}+b', U8'aaaaab', TRUE}, + {0642, U8'a?+b', U8'ab', TRUE}, + {0643, U8'fooa++a', U8'fooaaaaa', FALSE}, + {0644, U8'fooa*+a', U8'fooaaaaa', FALSE}, + {0645, U8'fooa{1,5}+a', U8'fooaaaaa', FALSE}, + {0646, U8'fooa?+a', U8'fooab', FALSE}, + {0647, U8'fooa++b', U8'fooaaaaab', TRUE}, + {0648, U8'fooa*+b', U8'fooaaaaab', TRUE}, + {0649, U8'fooa{1,5}+b', U8'fooaaaaab', TRUE}, + {0650, U8'fooa?+b', U8'fooab', TRUE}, + {0651, U8'(?:aA)++(?:aA)', U8'aAaAaAaAaA', FALSE}, + {0652, U8'(aA)++(aA)', U8'aAaAaAaAaA', FALSE}, + {0653, U8'(aA|bB)++(aA|bB)', U8'aAaAbBaAbB', FALSE}, + {0654, U8'(?:aA|bB)++(?:aA|bB)', U8'aAbBbBbBaA', FALSE}, + {0655, U8'(?:aA)*+(?:aA)', U8'aAaAaAaAaA', FALSE}, + {0656, U8'(aA)*+(aA)', U8'aAaAaAaAaA', FALSE}, + {0657, U8'(aA|bB)*+(aA|bB)', U8'aAaAbBaAaA', FALSE}, + {0658, U8'(?:aA|bB)*+(?:aA|bB)', U8'aAaAaAbBaA', FALSE}, + {0659, U8'(?:aA){1,5}+(?:aA)', U8'aAaAaAaAaA', FALSE}, + {0660, U8'(aA){1,5}+(aA)', U8'aAaAaAaAaA', FALSE}, + {0661, U8'(aA|bB){1,5}+(aA|bB)', U8'aAaAbBaAaA', FALSE}, + {0662, U8'(?:aA|bB){1,5}+(?:aA|bB)', U8'bBbBbBbBbB', FALSE}, + {0663, U8'(?:aA)?+(?:aA)', U8'aAb', FALSE}, + {0664, U8'(aA)?+(aA)', U8'aAb', FALSE}, + {0665, U8'(aA|bB)?+(aA|bB)', U8'bBb', FALSE}, + {0666, U8'(?:aA|bB)?+(?:aA|bB)', U8'aAb', FALSE}, + {0667, U8'(?:aA)++b', U8'aAaAaAaAaAb', TRUE}, + {0668, U8'(aA)++b', U8'aAaAaAaAaAb', TRUE}, + {0669, U8'(aA|bB)++b', U8'aAbBaAaAbBb', TRUE}, + {0670, U8'(?:aA|bB)++b', U8'aAbBbBaAaAb', TRUE}, + {0671, U8'(?:aA)*+b', U8'aAaAaAaAaAb', TRUE}, + {0672, U8'(aA)*+b', U8'aAaAaAaAaAb', TRUE}, + {0673, U8'(aA|bB)*+b', U8'bBbBbBbBbBb', TRUE}, + {0674, U8'(?:aA|bB)*+b', U8'bBaAbBbBaAb', TRUE}, + {0675, U8'(?:aA){1,5}+b', U8'aAaAaAaAaAb', TRUE}, + {0676, U8'(aA){1,5}+b', U8'aAaAaAaAaAb', TRUE}, + {0677, U8'(aA|bB){1,5}+b', U8'bBaAbBaAbBb', TRUE}, + {0678, U8'(?:aA|bB){1,5}+b', U8'aAbBaAbBbBb', TRUE}, + {0679, U8'(?:aA)?+b', U8'aAb', TRUE}, + {0680, U8'(aA)?+b', U8'aAb', TRUE}, + {0681, U8'(aA|bB)?+b', U8'bBb', TRUE}, + {0682, U8'(?:aA|bB)?+b', U8'bBb', TRUE}, + {0683, U8'foo(?:aA)++(?:aA)', U8'fooaAaAaAaAaA', FALSE}, + {0684, U8'foo(aA)++(aA)', U8'fooaAaAaAaAaA', FALSE}, + {0685, U8'foo(aA|bB)++(aA|bB)', U8'foobBbBbBaAaA', FALSE}, + {0686, U8'foo(?:aA|bB)++(?:aA|bB)', U8'fooaAaAaAaAaA', FALSE}, + {0687, U8'foo(?:aA)*+(?:aA)', U8'fooaAaAaAaAaA', FALSE}, + {0688, U8'foo(aA)*+(aA)', U8'fooaAaAaAaAaA', FALSE}, + {0689, U8'foo(aA|bB)*+(aA|bB)', U8'foobBaAbBaAaA', FALSE}, + {0690, U8'foo(?:aA|bB)*+(?:aA|bB)', U8'fooaAaAbBbBaA', FALSE}, + {0691, U8'foo(?:aA){1,5}+(?:aA)', U8'fooaAaAaAaAaA', FALSE}, + {0692, U8'foo(aA){1,5}+(aA)', U8'fooaAaAaAaAaA', FALSE}, + {0693, U8'foo(aA|bB){1,5}+(aA|bB)', U8'fooaAbBbBaAaA', FALSE}, + {0694, U8'foo(?:aA|bB){1,5}+(?:aA|bB)', U8'fooaAbBbBaAbB', FALSE}, + {0695, U8'foo(?:aA)?+(?:aA)', U8'fooaAb', FALSE}, + {0696, U8'foo(aA)?+(aA)', U8'fooaAb', FALSE}, + {0697, U8'foo(aA|bB)?+(aA|bB)', U8'foobBb', FALSE}, + {0698, U8'foo(?:aA|bB)?+(?:aA|bB)', U8'fooaAb', FALSE}, + {0699, U8'foo(?:aA)++b', U8'fooaAaAaAaAaAb', TRUE}, + {0700, U8'foo(aA)++b', U8'fooaAaAaAaAaAb', TRUE}, + {0701, U8'foo(aA|bB)++b', U8'foobBaAbBaAbBb', TRUE}, + {0702, U8'foo(?:aA|bB)++b', U8'fooaAaAbBaAaAb', TRUE}, + {0703, U8'foo(?:aA)*+b', U8'fooaAaAaAaAaAb', TRUE}, + {0704, U8'foo(aA)*+b', U8'fooaAaAaAaAaAb', TRUE}, + {0705, U8'foo(aA|bB)*+b', U8'foobBbBaAaAaAb', TRUE}, + {0706, U8'foo(?:aA|bB)*+b', U8'foobBaAaAbBaAb', TRUE}, + {0707, U8'foo(?:aA){1,5}+b', U8'fooaAaAaAaAaAb', TRUE}, + {0708, U8'foo(aA){1,5}+b', U8'fooaAaAaAaAaAb', TRUE}, + {0709, U8'foo(aA|bB){1,5}+b', U8'foobBaAaAaAaAb', TRUE}, + {0710, U8'foo(?:aA|bB){1,5}+b', U8'fooaAbBaAbBbBb', TRUE}, + {0711, U8'foo(?:aA)?+b', U8'fooaAb', TRUE}, + {0712, U8'foo(aA)?+b', U8'fooaAb', TRUE}, + {0713, U8'foo(aA|bB)?+b', U8'foobBb', TRUE}, + {0714, U8'foo(?:aA|bB)?+b', U8'foobBb', TRUE}, + {0715, U8'([^()]++|\\([^()]*\\))+', U8'((abc(ade)ufh()()x', TRUE}, + {0716, U8'round\\(([^()]++)\\)', U8'_I(round(xs * sz),1)', TRUE}, + {0717, U8'(foo[1x]|bar[2x]|baz[3x])+y', U8'foo1bar2baz3y', TRUE}, + {0718, U8'(foo[1x]|bar[2x]|baz[3x])*y', U8'foo1bar2baz3y', TRUE}, + {0719, U8'([yX].|WORDS|[yX].|WORD)S', U8'WORDS', TRUE}, + {0720, U8'([yX].|WORDS|WORD|[xY].)S', U8'WORDS', TRUE}, + {0721, U8'(foo|fool|[zx].|money|parted)$', U8'fool', TRUE}, + {0722, U8'([zx].|foo|fool|[zq].|money|parted|[yx].)$', U8'fool', TRUE}, + {0723, U8'(foo|fool|[zx].|money|parted)$', U8'fools', FALSE}, + {0724, U8'([zx].|foo|fool|[qx].|money|parted|[py].)$', U8'fools', FALSE}, + {0725, U8'([yX].|WORDS|[yX].|WORD)+S', U8'WORDS', TRUE}, + {0726, U8'(WORDS|WORLD|WORD)+S', U8'WORDS', TRUE}, + {0727, U8'([yX].|WORDS|WORD|[xY].)+S', U8'WORDS', TRUE}, + {0728, U8'(foo|fool|[zx].|money|parted)+$', U8'fool', TRUE}, + {0729, U8'([zx].|foo|fool|[zq].|money|parted|[yx].)+$', U8'fool', TRUE}, + {0730, U8'(foo|fool|[zx].|money|parted)+$', U8'fools', FALSE}, + {0731, U8'([zx].|foo|fool|[qx].|money|parted|[py].)+$', U8'fools', FALSE}, + {0732, U8'(x|y|z[QW])+(longish|loquatious|excessive|overblown[QW])+', U8'xyzQzWlongishoverblownW', TRUE}, + {0733, U8'(x|y|z[QW])*(longish|loquatious|excessive|overblown[QW])*', U8'xyzQzWlongishoverblownW', TRUE}, + {0734, U8'(x|y|z[QW]){1,5}(longish|loquatious|excessive|overblown[QW]){1,5}', U8'xyzQzWlongishoverblownW', TRUE}, + {0735, U8'(x|y|z[QW])++(longish|loquatious|excessive|overblown[QW])++', U8'xyzQzWlongishoverblownW', TRUE}, + {0736, U8'(x|y|z[QW])*+(longish|loquatious|excessive|overblown[QW])*+', U8'xyzQzWlongishoverblownW', TRUE}, + {0737, U8'(x|y|z[QW]){1,5}+(longish|loquatious|excessive|overblown[QW]){1,5}+', U8'xyzQzWlongishoverblownW', TRUE}, + {0738, U8'a*(?!)', U8'aaaab', FALSE}, + {0739, U8'a*(*FAIL)', U8'aaaab', FALSE}, + {0740, U8'a*(*F)', U8'aaaab', FALSE}, + {0741, U8'(A(A|B(*ACCEPT)|C)D)(E)', U8'AB', TRUE}, + {0742, U8'(A(A|B(*ACCEPT)|C)D)(E)', U8'ACDE', TRUE}, + {0743, U8'(a)(?:(?-1)|(?+1))(b)', U8'aab', TRUE}, + {0744, U8'(a)(?:(?-1)|(?+1))(b)', U8'abb', TRUE}, + {0745, U8'(a)(?:(?-1)|(?+1))(b)', U8'acb', FALSE}, + {0746, U8'(foo)(\\g-2)', U8'foofoo', TRUE}, + {0747, U8'(foo)(\\g-2)(foo)(\\g-2)', U8'foofoofoofoo', TRUE}, + {0748, U8'(([abc]+) \\g-1)(([abc]+) \\g{-1})', U8'abc abccba cba', TRUE}, + {0749, U8'(a)(b)(c)\\g1\\g2\\g3', U8'abcabc', TRUE}, + {0750, U8'(?<=bar>)foo', U8'bar>foo', TRUE}, + {0751, U8'(?)foo', U8'bar>foo', FALSE}, + {0752, U8'(?<=bar>ABC)foo', U8'bar>ABCfoo', TRUE}, + {0753, U8'(?ABC)foo', U8'bar>ABCfoo', FALSE}, + {0754, U8'(?)foo', U8'bar>ABCfoo', TRUE}, + {0755, U8'(?ABC)foo', U8'bar>ABCfoo', TRUE}, + {0756, U8'(?<=abcd(?<=(aaaabcd)))', U8'..aaaabcd..', TRUE}, + {0757, U8'(?=xy(?<=(aaxy)))', U8'..aaxy..', TRUE}, + {0758, U8'X(\\w+)(?=\\s)|X(\\w+)', U8'Xab', TRUE}, + {0759, U8'(?|(a))', U8'a', TRUE}, + {0760, U8'(?|a(.)b|d(.(o).)d|i(.)(.)j)(.)', U8'd!o!da', TRUE}, + {0761, U8'(?|a(.)b|d(.(o).)d|i(.)(.)j)(.)', U8'aabc', TRUE}, + {0762, U8'(?|a(.)b|d(.(o).)d|i(.)(.)j)(.)', U8'ixyjp', TRUE}, + {0763, U8'(?|(?|(a)|(b))|(?|(c)|(d)))', U8'a', TRUE}, + {0764, U8'(?|(?|(a)|(b))|(?|(c)|(d)))', U8'b', TRUE}, + {0765, U8'(?|(?|(a)|(b))|(?|(c)|(d)))', U8'c', TRUE}, + {0766, U8'(?|(?|(a)|(b))|(?|(c)|(d)))', U8'd', TRUE}, + {0767, U8'(.)(?|(.)(.)x|(.)d)(.)', U8'abcde', TRUE}, + {0768, U8'(\n)(?|(\n)(\n)x|(\n)d)(\n)', U8'abcde', FALSE}, + {0769, U8'(?|(?x))', U8'x', TRUE}, + {0770, U8'(?)(?|(?x))', U8'x', TRUE}, + {0771, U8'(?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a))', U8'a', TRUE}, + {0772, U8'(?(DEFINE)(?(?&B)+)(?a))(?&A)', U8'a', TRUE}, + {0773, U8'(?(DEFINE)(?(?&B)+)(?a))(?&A)', U8'aa', TRUE}, + {0774, U8'foo(\r)bar', U8'foo\r\nbar', TRUE}, + {0775, U8'foo(\r)bar', U8'foo\nbar', TRUE}, + {0776, U8'foo(\r)bar', U8'foo\rbar', TRUE}, + {0777, U8'foo(\r+)bar', U8'foo\r\n\\x{85}\r\n\nbar', TRUE}, + {0778, U8'(\\V+)(\r)', U8'foo\r\n\\x{85}\r\n\nbar', TRUE}, + {0779, U8'(\r+)(\\V)', U8'foo\r\n\\x{85}\r\n\nbar', TRUE}, + {0780, U8'foo(\r)bar', U8'foo\\x{85}bar', TRUE}, + {0781, U8'(\\V)(\r)', U8'foo\\x{85}bar', TRUE}, + {0782, U8'(\r)(\\V)', U8'foo\\x{85}bar', TRUE}, + {0783, U8'(\\V)(\r)', U8'foo\r\nbar', TRUE}, + {0784, U8'(\r)(\\V)', U8'foo\r\nbar', TRUE}, + {0785, U8'(\\V)(\r)', U8'foo\rbar', TRUE}, + {0786, U8'(\r)(\\V)', U8'foo\rbar', TRUE}, + {0787, U8'0|\r??\n0', U8'\n\n', FALSE}, + {0788, U8'foo(\\v+)bar', U8'foo\r\n\\x{85}\r\n\nbar', TRUE}, + {0789, U8'(\\v+)(\\V)', U8'foo\r\n\\x{85}\r\n\nbar', TRUE}, + {0790, U8'foo(\\v)bar', U8'foo\\x{85}bar', TRUE}, + {0791, U8'(\\v)(\\V)', U8'foo\\x{85}bar', TRUE}, + {0792, U8'foo(\\v)bar', U8'foo\rbar', TRUE}, + {0793, U8'(\\v)(\\V)', U8'foo\rbar', TRUE}, + {0794, U8'foo(\\h+)bar', U8'foo\t\\x{A0}bar', TRUE}, + {0795, U8'(\\h+)(\\H)', U8'foo\t\\x{A0}bar', TRUE}, + {0796, U8'foo(\\h)bar', U8'foo\\x{A0}bar', TRUE}, + {0797, U8'(\\h)(\\H)', U8'foo\\x{A0}bar', TRUE}, + {0798, U8'foo(\\h)bar', U8'foo\tbar', TRUE}, + {0799, U8'(\\h)(\\H)', U8'foo\tbar', TRUE}, + {0800, U8'.*\\z', U8'foo\n', TRUE}, + {0801, U8'\n*\\z', U8'foo\n', TRUE}, + {0802, U8'^(?:(\\d)x)?\\d$', U8'1', TRUE}, + {0803, U8'.*?(?:(\\w)|(\\w))x', U8'abx', TRUE}, + {0804, U8'0{50}', U8'000000000000000000000000000000000000000000000000000', TRUE}, + {0805, U8'^a?(?=b)b', U8'ab', TRUE}, + {0806, U8'^a*(?=b)b', U8'ab', TRUE}, + {0807, U8'[\\s][\\S]', U8'\\x{a0}\\x{a0}', FALSE}, + {0808, U8'abc\n\\{U+BEEF\\}', U8'abc.{UBEEF}', TRUE}, + {0809, U8'abc\n', U8'abcd', TRUE}, + {0810, U8'abc\n', U8'abc\n', FALSE}, + {0811, U8'\\c@', U8'\\0', FALSE}, + {0812, U8'\\cA', U8'\\001', FALSE}, + {0813, U8'\\cB', U8'\\002', FALSE}, + {0814, U8'\\cC', U8'\\003', FALSE}, + {0815, U8'\\cI', U8'\\011', FALSE}, + {0816, U8'\\cJ', U8'\\012', FALSE}, + {0817, U8'\\cR', U8'\\022', FALSE}, + {0818, U8'\\cS', U8'\\023', FALSE}, + {0819, U8'\\cX', U8'\\030', FALSE}, + {0820, U8'\\cY', U8'\\031', FALSE}, + {0821, U8'\\cZ', U8'\\032', FALSE}, + {0822, U8'\\c[', U8'\\033', FALSE}, + {0823, U8'\\c\\X', U8'\\034X', FALSE}, + {0824, U8'\\c]', U8'\\035', FALSE}, + {0825, U8'\\c^', U8'\\036', FALSE}, + {0826, U8'\\c_', U8'\\037', FALSE}, + {0827, U8'\\o{120}', U8'\\x{50}', TRUE}, + {0828, U8'[a\\o{120}]', U8'\\x{50}', TRUE}, + {0829, U8'[\\006]', U8'\\006', TRUE}, + {0830, U8'[\\006]', U8'6\\000', FALSE}, + {0831, U8'[\\0005]', U8'\\0005', TRUE}, + {0832, U8'[\\0005]', U8'5\\000', TRUE}, + {0833, U8'[\\_]', U8'_', TRUE}, + {0834, U8'(q1|.)*(q2|.)*(x(a|bc)*y){2,}', U8'xayxay', TRUE}, + {0835, U8'(q1|.)*(q2|.)*(x(a|bc)*y){2,3}', U8'xayxay', TRUE}, + {0836, U8'(q1|z)*(q2|z)*z{15}-.*?(x(a|bc)*y){2,3}Z', U8'zzzzzzzzzzzzzzzz-xayxayxayxayZ', TRUE}, + {0837, U8'(?:(?:)foo|bar|zot|rt78356)', U8'foo', TRUE}, + {0838, U8'^m?(\\S)(.*)\\1$', U8'aba', TRUE}, + {0839, U8'^m?(\\S)(.*)\\1$', U8'\tb\t', FALSE}, + {0840, U8'^m?(\\s)(.*)\\1$', U8'\tb\t', TRUE}, + {0841, U8'^m?(\\s)(.*)\\1$', U8'aba', FALSE}, + {0842, U8'^m?(\\W)(.*)\\1$', U8':b:', TRUE}, + {0843, U8'^m?(\\W)(.*)\\1$', U8'aba', FALSE}, + {0844, U8'^m?(\\w)(.*)\\1$', U8'aba', TRUE}, + {0845, U8'^m?(\\w)(.*)\\1$', U8':b:', FALSE}, + {0846, U8'^m?(\\D)(.*)\\1$', U8'aba', TRUE}, + {0847, U8'^m?(\\D)(.*)\\1$', U8'5b5', FALSE}, + {0848, U8'^m?(\\d)(.*)\\1$', U8'5b5', TRUE}, + {0849, U8'^m?(\\d)(.*)\\1$', U8'aba', FALSE}, + {0850, U8'^_?[^\\W_0-9]\\w\\z', U8'\\xAA\\x{100}', TRUE}, + {0851, U8'(?#( (?{1+)a', U8'a', TRUE}, + {0852, U8'ab[(?{1]', U8'ab1', TRUE}, + {0853, U8'ab[(?{1\\](?{2]', U8'ab2', TRUE}, + {0854, U8'[^\\p{Alphabetic}]', U8'\\x{100}', FALSE}, + {0855, U8'^(.)(?:(..)|B)[CX]', U8'ABCDE', TRUE}, + {0856, U8'^(.)(?:BC(.)|B)[CX]', U8'ABCDE', TRUE}, + {0857, U8'^(.)(?:(.)+)*[BX]', U8'ABCDE', TRUE}, + {0858, U8'^(.)(BC)*', U8'ABCDE', TRUE}, + {0859, U8'^(.)(BC)*[BX]', U8'ABCDE', TRUE}, + {0860, U8'^(.)(B)*.[DX]', U8'ABCDE', TRUE}, + {0861, U8'^(.)(B)*.[CX]', U8'ABCDE', TRUE}, + {0862, U8'^(?:(X)?(\\d)|(X)?(\\d\\d))$', U8'X12', TRUE}, + {0863, U8'^(?:(XX)?(\\d)|(XX)?(\\d\\d))$', U8'XX12', TRUE}, + {0864, U8'\\A(?>\\[(?:(?:)(?:R){1}|T|V?|A)\\])\\z', U8'[A]', TRUE}, + {0865, U8'[^\n]+', U8'\nb', TRUE}, + {0866, U8'[^\n]+', U8'a\n', TRUE}, + {0867, U8'\\w', U8'\\x{200C}', TRUE}, + {0868, U8'\\W', U8'\\x{200C}', FALSE}, + {0869, U8'\\w', U8'\\x{200D}', TRUE}, + {0870, U8'\\W', U8'\\x{200D}', FALSE}, + {0871, U8'^\r{2}$', U8'\r\n\r\n', TRUE}, + {0872, U8'\\Vn', U8'\\xFFn/', TRUE}, + {0873, U8'^_?[^\\S_0-9]\\w*\\z', U8'\t', TRUE}, + {0874, U8'a?\\X', U8'a\\x{100}', TRUE}, + {0875, U8'a?\r', U8'a\n', TRUE}, + {0876, U8'^a?\n$', U8'a\n', TRUE}, + {0877, U8'\n?a', U8'\na', TRUE}, + {0878, U8'(A(*PRUNE)B|A(*PRUNE)C)', U8'AC', FALSE}, + {0879, U8'(A(*PRUNE)B|A(*PRUNE)D|A(*PRUNE)C)', U8'AC', FALSE}, + {0880, U8'(A(*PRUNE)B|A(*PRUNE)C|A(*PRUNE)D)', U8'AC', FALSE}, + {0881, U8'((A(*PRUNE)B|A(*PRUNE)C))', U8'AC', FALSE}, + {0882, U8'((A(*PRUNE)B|A(*PRUNE)D|A(*PRUNE)C))', U8'AC', FALSE}, + {0883, U8'((A(*PRUNE)B|A(*PRUNE)C|A(*PRUNE)D))', U8'AC', FALSE}, + {0884, U8'A+?(*THEN)BC', U8'AAABC', TRUE}, + {0885, U8'A+?(*PRUNE)BC', U8'AAABC', TRUE}, + {0886, U8'A+(*THEN)BC', U8'AAABC', TRUE}, + {0887, U8'A+(*PRUNE)BC', U8'AAABC', TRUE}, + {0888, U8'^(?=(a)){0}b(?1)', U8'back', TRUE}, + {0889, U8'(?:(a(*SKIP)b)){0}(?:(?1)|ac)', U8'x', FALSE}, + {0890, U8'(?1)(?:(b)){0}', U8'b', TRUE}, + {0891, U8'(?a)(?(?=(?&W))(?<=(?&W)))(?&BB)', U8'aa', TRUE}, + {0892, U8'^x?abc?de', U8'abcde', TRUE}, + {0895, U8'\\d<(.*?)>', U8'a<>', FALSE}, + {0896, U8'[bcd].{2,3}aaaa', U8'XbXaaaaa', TRUE}, + {0897, U8'[bcd].{2,3}aaaa', U8'Xb\\x{100}aaaaa', TRUE}, + {0899, U8'^((?(?=x)xb|ya)z)', U8'xbz', TRUE}, + {0900, U8'^((?(?=x)xb|ya)z)', U8'yaz', TRUE}, + {0901, U8'^((?(?!y)xb|ya)z)', U8'xbz', TRUE}, + {0902, U8'^((?(?!y)xb|ya)z)', U8'yaz', TRUE}, + {0903, U8'^((?(?!)xb|ya)z)', U8'xbz', FALSE}, + {0904, U8'^((?(?!)xb|ya)z)', U8'yaz', TRUE}, + {0905, U8'ab(?#Comment){2}c', U8'abbc', TRUE}, + {0906, U8'(?:.||)(?|)000000000@', U8'000000000@', TRUE}, + {0907, U8'aa$|a(?R)a|a', U8'aaa', TRUE}, + {0908, U8'(?:\\1|a)([bcd])\\1(?:(?R)|e)\\1', U8'abbaccaddedcb', TRUE}, + {0909, U8'(.*?(a(a)|i(i))n)', U8'riiaan', TRUE}, + {0910, U8'(^(?:(\\d)x)?\\d$)', U8'1', TRUE}, + {0911, U8'(X{2,}[-X]{1,4}){3,}X{2,}', U8'XXX-XXX-XXX--', FALSE}, + {0912, U8'^a?bcd\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff', U8'ABCDEFGHIJKLMNOPQRSTUVWXYZ', FALSE}, + {0913, U8'^Xaaa?Xaa', U8'aaa\\x{400000}', FALSE}, + {0914, U8'^(\\d+)*?4X$', U8'1234X', TRUE}, + {0915, U8'\\A([\\x00-\\x7F]+)(.*)\\z', U8'\\007\\011\\012', TRUE}, + {0916, U8'^((\\w|<(\\s)*(?1)(?3)*>)(?:(?3)*\\+(?3)*(?2))*)(?3)*\\+', U8'a + b + ', TRUE}, + {0917, U8'^((\\w|<(\\s)*(?1)(?3)*>)(?:(?3)*\\+(?3)*(?2))*)(?3)*\\+', U8'a + + c', TRUE}, + {0918, U8'(?<=(?= MIN_PASS_PERCENTAGE; +resultStr := IF(isSuccess, 'PASSED', 'FAILED'); +fullResultStr := resultStr + ': ' + (STRING)(ROUND(passedPercentage * 100, 2)); + +// Output for unit test parsing +OUTPUT(resultStr, NAMED('result')); + +// Uncomment the following to see details +// OUTPUT(numTests, NAMED('num_tests')); +// OUTPUT(numTestsPassed, NAMED('num_passed')); +// OUTPUT(numTestsFailed, NAMED('num_failed')); +// OUTPUT(fullResultStr, NAMED('result_desc')); +// OUTPUT(testsFailed, NAMED('failed_tests'), ALL); diff --git a/testing/regress/ecl/regex_string_1.ecl b/testing/regress/ecl/regex_string_1.ecl deleted file mode 100644 index dbefa364457..00000000000 --- a/testing/regress/ecl/regex_string_1.ecl +++ /dev/null @@ -1,964 +0,0 @@ -/*############################################################################## - - HPCC SYSTEMS software Copyright (C) 2024 HPCC Systems®. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -############################################################################## */ - -//Tests derived from the python3 test suite - -#OPTION('globalFold', FALSE); - -regexTests := DATASET - ( - [ - {'abc', 'abc', TRUE}, - {'abc', 'xbc', FALSE}, - {'abc', 'axc', FALSE}, - {'abc', 'abx', FALSE}, - {'abc', 'xabcy', TRUE}, - {'abc', 'ababc', TRUE}, - {'ab*c', 'abc', TRUE}, - {'ab*bc', 'abc', TRUE}, - {'ab*bc', 'abbc', TRUE}, - {'ab*bc', 'abbbbc', TRUE}, - {'.{1}', 'abbbbc', TRUE}, - {'.{3,4}', 'abbbbc', TRUE}, - {'ab{0,}bc', 'abbbbc', TRUE}, - {'ab+bc', 'abbc', TRUE}, - {'ab+bc', 'abc', FALSE}, - {'ab+bc', 'abq', FALSE}, - {'ab{1,}bc', 'abq', FALSE}, - {'ab+bc', 'abbbbc', TRUE}, - {'ab{1,}bc', 'abbbbc', TRUE}, - {'ab{1,3}bc', 'abbbbc', TRUE}, - {'ab{3,4}bc', 'abbbbc', TRUE}, - {'ab{4,5}bc', 'abbbbc', FALSE}, - {'ab?bc', 'abbc', TRUE}, - {'ab?bc', 'abc', TRUE}, - {'ab{0,1}bc', 'abc', TRUE}, - {'ab?bc', 'abbbbc', FALSE}, - {'ab?c', 'abc', TRUE}, - {'ab{0,1}c', 'abc', TRUE}, - {'^abc$', 'abc', TRUE}, - {'^abc$', 'abcc', FALSE}, - {'^abc', 'abcc', TRUE}, - {'^abc$', 'aabc', FALSE}, - {'abc$', 'aabc', TRUE}, - {'abc$', 'aabcd', FALSE}, - {'^', 'abc', TRUE}, - {'$', 'abc', TRUE}, - {'a.c', 'abc', TRUE}, - {'a.c', 'axc', TRUE}, - {'a\nc', 'abc', TRUE}, - {'a.*c', 'axyzc', TRUE}, - {'a\n*c', 'axyzc', TRUE}, - {'a.*c', 'axyzd', FALSE}, - {'a\n*c', 'axyzd', FALSE}, - {'a[bc]d', 'abc', FALSE}, - {'a[bc]d', 'abd', TRUE}, - {'a[b]d', 'abd', TRUE}, - {'[a][b][d]', 'abd', TRUE}, - {'.[b].', 'abd', TRUE}, - {'.[b].', 'aBd', FALSE}, - {'(?i:.[b].)', 'abd', TRUE}, - {'(?i:\n[b]\n)', 'abd', TRUE}, - {'a[b-d]e', 'abd', FALSE}, - {'a[b-d]e', 'ace', TRUE}, - {'a[b-d]', 'aac', TRUE}, - {'a[-b]', 'a-', TRUE}, - {'a[b-]', 'a-', TRUE}, - {'a]', 'a]', TRUE}, - {'a[]]b', 'a]b', TRUE}, - {'a[^bc]d', 'aed', TRUE}, - {'a[^bc]d', 'abd', FALSE}, - {'a[^-b]c', 'adc', TRUE}, - {'a[^-b]c', 'a-c', FALSE}, - {'a[^]b]c', 'a]c', FALSE}, - {'a[^]b]c', 'adc', TRUE}, - {'\\ba\\b', 'a-', TRUE}, - {'\\ba\\b', '-a', TRUE}, - {'\\ba\\b', '-a-', TRUE}, - {'\\by\\b', 'xy', FALSE}, - {'\\by\\b', 'yz', FALSE}, - {'\\by\\b', 'xyz', FALSE}, - {'\\Ba\\B', 'a-', FALSE}, - {'\\Ba\\B', '-a', FALSE}, - {'\\Ba\\B', '-a-', FALSE}, - {'\\By\\b', 'xy', TRUE}, - {'\\by\\B', 'yz', TRUE}, - {'\\By\\B', 'xyz', TRUE}, - {'\\w', 'a', TRUE}, - {'\\w', '-', FALSE}, - {'\\W', 'a', FALSE}, - {'\\W', '-', TRUE}, - {'a\\sb', 'a b', TRUE}, - {'a\\sb', 'a-b', FALSE}, - {'a\\Sb', 'a b', FALSE}, - {'a\\Sb', 'a-b', TRUE}, - {'\\d', '1', TRUE}, - {'\\d', '-', FALSE}, - {'\\D', '1', FALSE}, - {'\\D', '-', TRUE}, - {'[\\w]', 'a', TRUE}, - {'[\\w]', '-', FALSE}, - {'[\\W]', 'a', FALSE}, - {'[\\W]', '-', TRUE}, - {'a[\\s]b', 'a b', TRUE}, - {'a[\\s]b', 'a-b', FALSE}, - {'a[\\S]b', 'a b', FALSE}, - {'a[\\S]b', 'a-b', TRUE}, - {'[\\d]', '1', TRUE}, - {'[\\d]', '-', FALSE}, - {'[\\D]', '1', FALSE}, - {'[\\D]', '-', TRUE}, - {'ab|cd', 'abc', TRUE}, - {'ab|cd', 'abcd', TRUE}, - {'()ef', 'def', TRUE}, - {'$b', 'b', FALSE}, - {'a\\(b', 'a(b', TRUE}, - {'a\\(*b', 'ab', TRUE}, - {'a\\(*b', 'a((b', TRUE}, - {'a\\\\b', 'a\\\\b', TRUE}, - {'((a))', 'abc', TRUE}, - {'(a)b(c)', 'abc', TRUE}, - {'a+b+c', 'aabbabc', TRUE}, - {'a{1,}b{1,}c', 'aabbabc', TRUE}, - {'a.+?c', 'abcabc', TRUE}, - {'(a+|b)*', 'ab', TRUE}, - {'(a+|b){0,}', 'ab', TRUE}, - {'(a+|b)+', 'ab', TRUE}, - {'(a+|b){1,}', 'ab', TRUE}, - {'(a+|b)?', 'ab', TRUE}, - {'(a+|b){0,1}', 'ab', TRUE}, - {'[^ab]*', 'cde', TRUE}, - {'([abc])*d', 'abbbcd', TRUE}, - {'([abc])*bcd', 'abcd', TRUE}, - {'a|b|c|d|e', 'e', TRUE}, - {'(a|b|c|d|e)f', 'ef', TRUE}, - {'abcd*efg', 'abcdefg', TRUE}, - {'ab*', 'xabyabbbz', TRUE}, - {'ab*', 'xayabbbz', TRUE}, - {'(ab|cd)e', 'abcde', TRUE}, - {'[abhgefdc]ij', 'hij', TRUE}, - {'^(ab|cd)e', 'abcde', FALSE}, - {'(abc|)ef', 'abcdef', TRUE}, - {'(a|b)c*d', 'abcd', TRUE}, - {'(ab|ab*)bc', 'abc', TRUE}, - {'a([bc]*)c*', 'abc', TRUE}, - {'a([bc]*)(c*d)', 'abcd', TRUE}, - {'a([bc]+)(c*d)', 'abcd', TRUE}, - {'a([bc]*)(c+d)', 'abcd', TRUE}, - {'a[bcd]*dcdcde', 'adcdcde', TRUE}, - {'a[bcd]+dcdcde', 'adcdcde', FALSE}, - {'(ab|a)b*c', 'abc', TRUE}, - {'((a)(b)c)(d)', 'abcd', TRUE}, - {'[a-zA-Z_][a-zA-Z0-9_]*', 'alpha', TRUE}, - {'[_A-Z]', '}', FALSE}, - {'^a(bc+|b[eh])g|.h$', 'abh', TRUE}, - {'(bc+d$|ef*g.|h?i(j|k))', 'effgz', TRUE}, - {'(bc+d$|ef*g.|h?i(j|k))', 'ij', TRUE}, - {'(bc+d$|ef*g.|h?i(j|k))', 'effg', FALSE}, - {'(bc+d$|ef*g.|h?i(j|k))', 'bcdd', FALSE}, - {'(bc+d$|ef*g.|h?i(j|k))', 'reffgz', TRUE}, - {'((((((((((a))))))))))', 'a', TRUE}, - {'((((((((((a))))))))))\\10', 'aa', TRUE}, - {'((((((((((a))))))))))${bang}', 'aa', FALSE}, - {'((((((((((a))))))))))${bang}', 'a!', TRUE}, - {'(((((((((a)))))))))', 'a', TRUE}, - {'[89]+', '1((((((7(9))))))', TRUE}, - {'multiple words of text', 'uh-uh', FALSE}, - {'multiple words', 'multiple words, yeah', TRUE}, - {'(.*)c(.*)', 'abcde', TRUE}, - {'\\((.*), (.*)\\)', '(a, b)', TRUE}, - {'[k]', 'ab', FALSE}, - {'abcd', 'abcd', TRUE}, - {'a(bc)d', 'abcd', TRUE}, - {'a[-]?c', 'ac', TRUE}, - {'(abc)\\1', 'abcabc', TRUE}, - {'([a-c]*)\\1', 'abcabc', TRUE}, - {'(a)|\\1', 'a', TRUE}, - {'(a)|\\1', 'x', FALSE}, - {'(?:(b)?a)\\1', 'a', FALSE}, - {'(([a-c])b*?\\2)*', 'ababbbcbc', TRUE}, - {'(([a-c])b*?\\2){3}', 'ababbbcbc', TRUE}, - {'((\\3|b)\\2(a)x)+', 'aaxabxbaxbbx', FALSE}, - {'((\\3|b)\\2(a)x)+', 'aaaxabaxbaaxbbax', TRUE}, - {'((\\3|b)\\2(a)){2,}', 'bbaababbabaaaaabbaaaabba', TRUE}, - {'^((.)?a\\2)+$', 'babadad', FALSE}, - {'(a)|(b)', 'b', TRUE}, - {'a(?!b).', 'abad', TRUE}, - {'a(?=d).', 'abad', TRUE}, - {'a(?=c|d).', 'abad', TRUE}, - {'a(?:b|c|d)(.)', 'ace', TRUE}, - {'a(?:b|c|d)*(.)', 'ace', TRUE}, - {'a(?:b|c|d)+?(.)', 'ace', TRUE}, - {'a(?:b|c|d)+?(.)', 'acdbcdbe', TRUE}, - {'a(?:b|c|d)+(.)', 'acdbcdbe', TRUE}, - {'a(?:b|c|d){2}(.)', 'acdbcdbe', TRUE}, - {'a(?:b|c|d){4,5}(.)', 'acdbcdbe', TRUE}, - {'a(?:b|c|d){4,5}?(.)', 'acdbcdbe', TRUE}, - {'((foo)|(bar))*', 'foobar', TRUE}, - {'a(?:b|c|d){6,7}(.)', 'acdbcdbe', TRUE}, - {'a(?:b|c|d){6,7}?(.)', 'acdbcdbe', TRUE}, - {'a(?:b|c|d){5,6}(.)', 'acdbcdbe', TRUE}, - {'a(?:b|c|d){5,6}?(.)', 'acdbcdbe', TRUE}, - {'a(?:b|c|d){5,7}(.)', 'acdbcdbe', TRUE}, - {'a(?:b|c|d){5,7}?(.)', 'acdbcdbe', TRUE}, - {'a(?:b|(c|e){1,2}?|d)+?(.)', 'ace', TRUE}, - {'^(.+)?B', 'AB', TRUE}, - {'^([^a-z])|(\\^)$', '.', TRUE}, - {'^[<>]&', '<&OUT', TRUE}, - {'^(a\\1?){4}$', 'aaaaaaaaaa', TRUE}, - {'^(a\\1?){4}$', 'aaaaaaaaa', FALSE}, - {'^(a\\1?){4}$', 'aaaaaaaaaaa', FALSE}, - {'^(a(?(1)\\1)){4}$', 'aaaaaaaaaa', TRUE}, - {'^(a(?(1)\\1)){4}$', 'aaaaaaaaa', FALSE}, - {'^(a(?(1)\\1)){4}$', 'aaaaaaaaaaa', FALSE}, - {'((?(1)a|b))+', 'baaa', TRUE}, - {'((?(1)aa|b))+', 'baaaa', TRUE}, - {'((a{4})+)', 'aaaaaaaaa', TRUE}, - {'(((aa){2})+)', 'aaaaaaaaaa', TRUE}, - {'(((a{2}){2})+)', 'aaaaaaaaaa', TRUE}, - {'(?:(f)(o)(o)|(b)(a)(r))*', 'foobar', TRUE}, - {'(?<=a)b', 'ab', TRUE}, - {'(?<=a)b', 'cb', FALSE}, - {'(?<=a)b', 'b', FALSE}, - {'(?a+)ab', 'aaab', FALSE}, - {'(?>a+)b', 'aaab', TRUE}, - {'([[:alpha:]]+)', 'ABcd01Xy__-- ${nulnul}${ffff}', TRUE}, - {'([[:alnum:]]+)', 'ABcd01Xy__-- ${nulnul}${ffff}', TRUE}, - {'([[:cntrl:]]+)', 'ABcd01Xy__-- ${nulnul}${ffff}', TRUE}, - {'([[:digit:]]+)', 'ABcd01Xy__-- ${nulnul}${ffff}', TRUE}, - {'([[:graph:]]+)', 'ABcd01Xy__-- ${nulnul}${ffff}', TRUE}, - {'([[:lower:]]+)', 'ABcd01Xy__-- ${nulnul}${ffff}', TRUE}, - {'([[:print:]]+)', 'ABcd01Xy__-- ${nulnul}${ffff}', TRUE}, - {'([[:punct:]]+)', 'ABcd01Xy__-- ${nulnul}${ffff}', TRUE}, - {'([[:space:]]+)', 'ABcd01Xy__-- ${nulnul}${ffff}', TRUE}, - {'([[:word:]]+)', 'ABcd01Xy__-- ${nulnul}${ffff}', TRUE}, - {'([[:upper:]]+)', 'ABcd01Xy__-- ${nulnul}${ffff}', TRUE}, - {'([[:xdigit:]]+)', 'ABcd01Xy__-- ${nulnul}${ffff}', TRUE}, - {'([[:^alpha:]]+)', 'ABcd01Xy__-- ${nulnul}${ffff}', TRUE}, - {'([[:^cntrl:]]+)', 'ABcd01Xy__-- ${nulnul}${ffff}', TRUE}, - {'([[:^digit:]]+)', 'ABcd01Xy__-- ${nulnul}${ffff}', TRUE}, - {'([[:^lower:]]+)', 'ABcd01Xy__-- ${nulnul}${ffff}', TRUE}, - {'([[:^punct:]]+)', 'ABcd01Xy__-- ${nulnul}${ffff}', TRUE}, - {'([[:^space:]]+)', 'ABcd01Xy__-- ${nulnul}${ffff}', TRUE}, - {'([[:^upper:]]+)', 'ABcd01Xy__-- ${nulnul}${ffff}', TRUE}, - {'([[:^xdigit:]]+)', 'ABcd01Xy__-- ${nulnul}${ffff}', TRUE}, - {'\'[[:^cntrl:]]+\'u', 'a\\x80', TRUE}, - {'((?>a+)b)', 'aaab', TRUE}, - {'(?>(a+))b', 'aaab', TRUE}, - {'((?>[^()]+)|\\([^()]*\\))+', '((abc(ade)ufh()()x', TRUE}, - {'\\z', 'a\nb\n', TRUE}, - {'$', 'a\nb\n', TRUE}, - {'\\z', 'b\na\n', TRUE}, - {'$', 'b\na\n', TRUE}, - {'\\z', 'b\na', TRUE}, - {'$', 'b\na', TRUE}, - {'\'\\z\'m', 'a\nb\n', TRUE}, - {'\'$\'m', 'a\nb\n', TRUE}, - {'\'\\z\'m', 'b\na\n', TRUE}, - {'\'$\'m', 'b\na\n', TRUE}, - {'\'\\z\'m', 'b\na', TRUE}, - {'\'$\'m', 'b\na', TRUE}, - {'a\\z', 'a\nb\n', FALSE}, - {'a$', 'a\nb\n', FALSE}, - {'a\\Z', 'b\na\n', TRUE}, - {'a\\z', 'b\na\n', FALSE}, - {'a$', 'b\na\n', TRUE}, - {'a\\z', 'b\na', TRUE}, - {'a$', 'b\na', TRUE}, - {'\'a\\z\'m', 'a\nb\n', FALSE}, - {'\'a$\'m', 'a\nb\n', TRUE}, - {'\'a\\Z\'m', 'b\na\n', TRUE}, - {'\'a\\z\'m', 'b\na\n', FALSE}, - {'\'a$\'m', 'b\na\n', TRUE}, - {'\'a\\z\'m', 'b\na', TRUE}, - {'\'a$\'m', 'b\na', TRUE}, - {'aa\\z', 'aa\nb\n', FALSE}, - {'aa$', 'aa\nb\n', FALSE}, - {'aa\\Z', 'b\naa\n', TRUE}, - {'aa\\z', 'b\naa\n', FALSE}, - {'aa$', 'b\naa\n', TRUE}, - {'aa\\z', 'b\naa', TRUE}, - {'aa$', 'b\naa', TRUE}, - {'\'aa\\z\'m', 'aa\nb\n', FALSE}, - {'\'aa$\'m', 'aa\nb\n', TRUE}, - {'\'aa\\Z\'m', 'b\naa\n', TRUE}, - {'\'aa\\z\'m', 'b\naa\n', FALSE}, - {'\'aa$\'m', 'b\naa\n', TRUE}, - {'\'aa\\z\'m', 'b\naa', TRUE}, - {'\'aa$\'m', 'b\naa', TRUE}, - {'aa\\z', 'ac\nb\n', FALSE}, - {'aa$', 'ac\nb\n', FALSE}, - {'aa\\z', 'b\nac\n', FALSE}, - {'aa$', 'b\nac\n', FALSE}, - {'aa\\z', 'b\nac', FALSE}, - {'aa$', 'b\nac', FALSE}, - {'\'aa\\z\'m', 'ac\nb\n', FALSE}, - {'\'aa$\'m', 'ac\nb\n', FALSE}, - {'\'aa\\z\'m', 'b\nac\n', FALSE}, - {'\'aa$\'m', 'b\nac\n', FALSE}, - {'\'aa\\z\'m', 'b\nac', FALSE}, - {'\'aa$\'m', 'b\nac', FALSE}, - {'aa\\z', 'ca\nb\n', FALSE}, - {'aa$', 'ca\nb\n', FALSE}, - {'aa\\z', 'b\nca\n', FALSE}, - {'aa$', 'b\nca\n', FALSE}, - {'aa\\z', 'b\nca', FALSE}, - {'aa$', 'b\nca', FALSE}, - {'\'aa\\z\'m', 'ca\nb\n', FALSE}, - {'\'aa$\'m', 'ca\nb\n', FALSE}, - {'\'aa\\z\'m', 'b\nca\n', FALSE}, - {'\'aa$\'m', 'b\nca\n', FALSE}, - {'\'aa\\z\'m', 'b\nca', FALSE}, - {'\'aa$\'m', 'b\nca', FALSE}, - {'ab\\z', 'ab\nb\n', FALSE}, - {'ab$', 'ab\nb\n', FALSE}, - {'ab\\Z', 'b\nab\n', TRUE}, - {'ab\\z', 'b\nab\n', FALSE}, - {'ab$', 'b\nab\n', TRUE}, - {'ab\\z', 'b\nab', TRUE}, - {'ab$', 'b\nab', TRUE}, - {'\'ab\\z\'m', 'ab\nb\n', FALSE}, - {'\'ab$\'m', 'ab\nb\n', TRUE}, - {'\'ab\\Z\'m', 'b\nab\n', TRUE}, - {'\'ab\\z\'m', 'b\nab\n', FALSE}, - {'\'ab$\'m', 'b\nab\n', TRUE}, - {'\'ab\\z\'m', 'b\nab', TRUE}, - {'\'ab$\'m', 'b\nab', TRUE}, - {'ab\\z', 'ac\nb\n', FALSE}, - {'ab$', 'ac\nb\n', FALSE}, - {'ab\\z', 'b\nac\n', FALSE}, - {'ab$', 'b\nac\n', FALSE}, - {'ab\\z', 'b\nac', FALSE}, - {'ab$', 'b\nac', FALSE}, - {'\'ab\\z\'m', 'ac\nb\n', FALSE}, - {'\'ab$\'m', 'ac\nb\n', FALSE}, - {'\'ab\\z\'m', 'b\nac\n', FALSE}, - {'\'ab$\'m', 'b\nac\n', FALSE}, - {'\'ab\\z\'m', 'b\nac', FALSE}, - {'\'ab$\'m', 'b\nac', FALSE}, - {'ab\\z', 'ca\nb\n', FALSE}, - {'ab$', 'ca\nb\n', FALSE}, - {'ab\\z', 'b\nca\n', FALSE}, - {'ab$', 'b\nca\n', FALSE}, - {'ab\\z', 'b\nca', FALSE}, - {'ab$', 'b\nca', FALSE}, - {'\'ab\\z\'m', 'ca\nb\n', FALSE}, - {'\'ab$\'m', 'ca\nb\n', FALSE}, - {'\'ab\\z\'m', 'b\nca\n', FALSE}, - {'\'ab$\'m', 'b\nca\n', FALSE}, - {'\'ab\\z\'m', 'b\nca', FALSE}, - {'\'ab$\'m', 'b\nca', FALSE}, - {'abb\\z', 'abb\nb\n', FALSE}, - {'abb$', 'abb\nb\n', FALSE}, - {'abb\\Z', 'b\nabb\n', TRUE}, - {'abb\\z', 'b\nabb\n', FALSE}, - {'abb$', 'b\nabb\n', TRUE}, - {'abb\\z', 'b\nabb', TRUE}, - {'abb$', 'b\nabb', TRUE}, - {'\'abb\\z\'m', 'abb\nb\n', FALSE}, - {'\'abb$\'m', 'abb\nb\n', TRUE}, - {'\'abb\\Z\'m', 'b\nabb\n', TRUE}, - {'\'abb\\z\'m', 'b\nabb\n', FALSE}, - {'\'abb$\'m', 'b\nabb\n', TRUE}, - {'\'abb\\z\'m', 'b\nabb', TRUE}, - {'\'abb$\'m', 'b\nabb', TRUE}, - {'abb\\z', 'ac\nb\n', FALSE}, - {'abb$', 'ac\nb\n', FALSE}, - {'abb\\z', 'b\nac\n', FALSE}, - {'abb$', 'b\nac\n', FALSE}, - {'abb\\z', 'b\nac', FALSE}, - {'abb$', 'b\nac', FALSE}, - {'\'abb\\z\'m', 'ac\nb\n', FALSE}, - {'\'abb$\'m', 'ac\nb\n', FALSE}, - {'\'abb\\z\'m', 'b\nac\n', FALSE}, - {'\'abb$\'m', 'b\nac\n', FALSE}, - {'\'abb\\z\'m', 'b\nac', FALSE}, - {'\'abb$\'m', 'b\nac', FALSE}, - {'abb\\z', 'ca\nb\n', FALSE}, - {'abb$', 'ca\nb\n', FALSE}, - {'abb\\z', 'b\nca\n', FALSE}, - {'abb$', 'b\nca\n', FALSE}, - {'abb\\z', 'b\nca', FALSE}, - {'abb$', 'b\nca', FALSE}, - {'\'abb\\z\'m', 'ca\nb\n', FALSE}, - {'\'abb$\'m', 'ca\nb\n', FALSE}, - {'\'abb\\z\'m', 'b\nca\n', FALSE}, - {'\'abb$\'m', 'b\nca\n', FALSE}, - {'\'abb\\z\'m', 'b\nca', FALSE}, - {'\'abb$\'m', 'b\nca', FALSE}, - {'\'\\Aa$\'m', 'a\n\n', TRUE}, - {'(^|x)(c)', 'ca', TRUE}, - {'a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz', 'x', FALSE}, - {'round\\(((?>[^()]+))\\)', '_I(round(xs * sz),1)', TRUE}, - {'\'((?x:.) )\'', 'x ', TRUE}, - {'\'((?-x:.) )\'x', 'x ', TRUE}, - {'foo.bart', 'foo.bart', TRUE}, - {'\'^d[x][x][x]\'m', 'abcd\ndxxx', TRUE}, - {'tt+$', 'xxxtt', TRUE}, - {'\\GX.*X', 'aaaXbX', FALSE}, - {'(\\d+\\.\\d+)', '3.1415926', TRUE}, - {'(\\ba.{0,10}br)', 'have a web browser', TRUE}, - {'^([a-z]:)', 'C:/', FALSE}, - {'\'^\\S\\s+aa$\'m', '\nx aa', TRUE}, - {'(^|a)b', 'ab', TRUE}, - {'^([ab]*?)(b)?(c)$', 'abac', TRUE}, - {'(\\w)?(abc)\\1b', 'abcab', FALSE}, - {'^(?:.,){2}c', 'a,b,c', TRUE}, - {'^(.,){2}c', 'a,b,c', TRUE}, - {'^(?:[^,]*,){2}c', 'a,b,c', TRUE}, - {'^([^,]*,){2}c', 'a,b,c', TRUE}, - {'^([^,]*,){3}d', 'aaa,b,c,d', TRUE}, - {'^([^,]*,){3,}d', 'aaa,b,c,d', TRUE}, - {'^([^,]*,){0,3}d', 'aaa,b,c,d', TRUE}, - {'^([^,]{1,3},){3}d', 'aaa,b,c,d', TRUE}, - {'^([^,]{1,3},){3,}d', 'aaa,b,c,d', TRUE}, - {'^([^,]{1,3},){0,3}d', 'aaa,b,c,d', TRUE}, - {'^([^,]{1,},){3}d', 'aaa,b,c,d', TRUE}, - {'^([^,]{1,},){3,}d', 'aaa,b,c,d', TRUE}, - {'^([^,]{1,},){0,3}d', 'aaa,b,c,d', TRUE}, - {'^([^,]{0,3},){3}d', 'aaa,b,c,d', TRUE}, - {'^([^,]{0,3},){3,}d', 'aaa,b,c,d', TRUE}, - {'^([^,]{0,3},){0,3}d', 'aaa,b,c,d', TRUE}, - {'\'(?!\\A)x\'m', 'a\nxb\n', TRUE}, - {'^(a(b)?)+$', 'aba', TRUE}, - {'^(aa(bb)?)+$', 'aabbaa', TRUE}, - {'\'^.{9}abc.*\n\'m', '123\nabcabcabcabc\n', TRUE}, - {'^(a)?a$', 'a', TRUE}, - {'^(a)?(?(1)a|b)+$', 'a', FALSE}, - {'^(a\\1?)(a\\1?)(a\\2?)(a\\3?)$', 'aaaaaa', TRUE}, - {'^(a\\1?){4}$', 'aaaaaa', TRUE}, - {'^(0+)?(?:x(1))?', 'x1', TRUE}, - {'^([0-9a-fA-F]+)(?:x([0-9a-fA-F]+)?)(?:x([0-9a-fA-F]+))?', '012cxx0190', TRUE}, - {'^(b+?|a){1,2}c', 'bbbac', TRUE}, - {'^(b+?|a){1,2}c', 'bbbbac', TRUE}, - {'\\((\\w\\. \\w+)\\)', 'cd. (A. Tw)', TRUE}, - {'((?:aaaa|bbbb)cccc)?', 'aaaacccc', TRUE}, - {'((?:aaaa|bbbb)cccc)?', 'bbbbcccc', TRUE}, - {'(a)?(a)+', 'a', TRUE}, - {'(ab)?(ab)+', 'ab', TRUE}, - {'(abc)?(abc)+', 'abc', TRUE}, - {'\'b\\s^\'m', 'a\nb\n', FALSE}, - {'\\ba', 'a', TRUE}, - {'ab(?i)cd', 'AbCd', FALSE}, - {'ab(?i)cd', 'abCd', TRUE}, - {'(A|B)*(?(1)(CD)|(CD))', 'CD', TRUE}, - {'(A|B)*(?(1)(CD)|(CD))', 'ABCD', TRUE}, - {'(A|B)*?(?(1)(CD)|(CD))', 'CD', TRUE}, - {'(A|B)*?(?(1)(CD)|(CD))', 'ABCD', TRUE}, - {'(.*)\\d+\\1', 'abc12bc', TRUE}, - {'(?m:(foo\\s*$))', 'foo\n bar', TRUE}, - {'(.*)c', 'abcd', TRUE}, - {'(.*)(?=c)', 'abcd', TRUE}, - {'(.*)(?=c)c', 'abcd', TRUE}, - {'(.*)(?=b|c)', 'abcd', TRUE}, - {'(.*)(?=b|c)c', 'abcd', TRUE}, - {'(.*)(?=c|b)', 'abcd', TRUE}, - {'(.*)(?=c|b)c', 'abcd', TRUE}, - {'(.*)(?=[bc])', 'abcd', TRUE}, - {'(.*)(?=[bc])c', 'abcd', TRUE}, - {'(.*)(?<=b)', 'abcd', TRUE}, - {'(.*)(?<=b)c', 'abcd', TRUE}, - {'(.*)(?<=b|c)', 'abcd', TRUE}, - {'(.*)(?<=b|c)c', 'abcd', TRUE}, - {'(.*)(?<=c|b)', 'abcd', TRUE}, - {'(.*)(?<=c|b)c', 'abcd', TRUE}, - {'(.*)(?<=[bc])', 'abcd', TRUE}, - {'(.*)(?<=[bc])c', 'abcd', TRUE}, - {'(.*?)c', 'abcd', TRUE}, - {'(.*?)(?=c)', 'abcd', TRUE}, - {'(.*?)(?=c)c', 'abcd', TRUE}, - {'(.*?)(?=b|c)', 'abcd', TRUE}, - {'(.*?)(?=b|c)c', 'abcd', TRUE}, - {'(.*?)(?=c|b)', 'abcd', TRUE}, - {'(.*?)(?=c|b)c', 'abcd', TRUE}, - {'(.*?)(?=[bc])', 'abcd', TRUE}, - {'(.*?)(?=[bc])c', 'abcd', TRUE}, - {'(.*?)(?<=b)', 'abcd', TRUE}, - {'(.*?)(?<=b)c', 'abcd', TRUE}, - {'(.*?)(?<=b|c)', 'abcd', TRUE}, - {'(.*?)(?<=b|c)c', 'abcd', TRUE}, - {'(.*?)(?<=c|b)', 'abcd', TRUE}, - {'(.*?)(?<=c|b)c', 'abcd', TRUE}, - {'(.*?)(?<=[bc])', 'abcd', TRUE}, - {'(.*?)(?<=[bc])c', 'abcd', TRUE}, - {'2(]*)?$\\1', '2', TRUE}, - {'a(b)??', 'abc', TRUE}, - {'(\\d{1,3}\\.){3,}', '128.134.142.8', TRUE}, - {'^.{3,4}(.+)\\1\\z', 'foobarbar', TRUE}, - {'^(?:f|o|b){3,4}(.+)\\1\\z', 'foobarbar', TRUE}, - {'^.{3,4}((?:b|a|r)+)\\1\\z', 'foobarbar', TRUE}, - {'^(?:f|o|b){3,4}((?:b|a|r)+)\\1\\z', 'foobarbar', TRUE}, - {'^.{3,4}(.+?)\\1\\z', 'foobarbar', TRUE}, - {'^(?:f|o|b){3,4}(.+?)\\1\\z', 'foobarbar', TRUE}, - {'^.{3,4}((?:b|a|r)+?)\\1\\z', 'foobarbar', TRUE}, - {'^(?:f|o|b){3,4}((?:b|a|r)+?)\\1\\z', 'foobarbar', TRUE}, - {'^.{2,3}?(.+)\\1\\z', 'foobarbar', TRUE}, - {'^(?:f|o|b){2,3}?(.+)\\1\\z', 'foobarbar', TRUE}, - {'^.{2,3}?((?:b|a|r)+)\\1\\z', 'foobarbar', TRUE}, - {'^(?:f|o|b){2,3}?((?:b|a|r)+)\\1\\z', 'foobarbar', TRUE}, - {'^.{2,3}?(.+?)\\1\\z', 'foobarbar', TRUE}, - {'^(?:f|o|b){2,3}?(.+?)\\1\\z', 'foobarbar', TRUE}, - {'^.{2,3}?((?:b|a|r)+?)\\1\\z', 'foobarbar', TRUE}, - {'^(?:f|o|b){2,3}?((?:b|a|r)+?)\\1\\z', 'foobarbar', TRUE}, - {'.*a(?!(b|cd)*e).*f', '......abef', FALSE}, - {'(WORDS|WORD)S', 'WORDS', TRUE}, - {'(X.|WORDS|X.|WORD)S', 'WORDS', TRUE}, - {'(WORDS|WORLD|WORD)S', 'WORDS', TRUE}, - {'(X.|WORDS|WORD|Y.)S', 'WORDS', TRUE}, - {'(foo|fool|x.|money|parted)$', 'fool', TRUE}, - {'(x.|foo|fool|x.|money|parted|y.)$', 'fool', TRUE}, - {'(foo|fool|money|parted)$', 'fool', TRUE}, - {'(foo|fool|x.|money|parted)$', 'fools', FALSE}, - {'(x.|foo|fool|x.|money|parted|y.)$', 'fools', FALSE}, - {'(foo|fool|money|parted)$', 'fools', FALSE}, - {'(a|aa|aaa||aaaa|aaaaa|aaaaaa)(b|c)', 'aaaaaaaaaaaaaaab', TRUE}, - {'^(a*?)(?!(aa|aaaa)*$)', 'aaaaaaaaaaaaaaaaaaaa', TRUE}, - {'^(a*?)(?!(aa|aaaa)*$)(?=a\\z)', 'aaaaaaaa', TRUE}, - {'^(.)\\s+.$(?(1))', 'A B', TRUE}, - {'(?:r?)*?r|(.{2,4})', 'abcde', TRUE}, - {'(?!)+?|(.{2,4})', 'abcde', TRUE}, - {'^(a*?)(?!(a{6}|a{5})*$)', 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', TRUE}, - {'^((?>(?:aa)?b)?)', 'aab', TRUE}, - {'^((?:aa)*)(?:X+((?:\\d+|-)(?:X+(.+))?))?$', 'aaaaX5', TRUE}, - {'X(A|B||C|D)Y', 'XXXYYY', TRUE}, - {'(?i:X([A]|[B]|y[Y]y|[D]|)Y)', 'XXXYYYB', TRUE}, - {'^([a]{1})*$', 'aa', TRUE}, - {'a(?!b(?!c))(..)', 'abababc', TRUE}, - {'a(?!b(?=a))(..)', 'abababc', TRUE}, - {'a(?!b(?!c(?!d(?!e))))...(.)', 'abxabcdxabcde', TRUE}, - {'X(?!b+(?!(c+)*(?!(c+)*d))).*X', 'aXbbbbbbbcccccccccccccaaaX', TRUE}, - {'^(XXXXXXXXXX|YYYYYYYYYY|Z.Q*X|Z[TE]Q*P):', 'ZEQQQQQQQQQQQQQQQQQQP:', TRUE}, - {'^(XXXXXXXXXX|YYYYYYYYYY|Z.Q*X|Z[TE]Q*P):', 'ZEQQQX:', TRUE}, - {'^([TUV]+|XXXXXXXXXX|YYYYYYYYYY|Z.Q*X|Z[TE]Q*P):', 'ZEQQQQQQQQQQQQQQQQQQP:', TRUE}, - {'^([TUV]+|XXXXXXXXXX|YYYYYYYYYY|Z.Q*X|Z[TE]Q*P):', 'ZEQQQX:', TRUE}, - {'^([TUV]+|XXXXXXXXXX|YYYYYYYYYY|Z.Q*X|Z[TE]Q*P|[MKJ]):', 'ZEQQQQQQQQQQQQQQQQQQP:', TRUE}, - {'^([TUV]+|XXXXXXXXXX|YYYYYYYYYY|Z.Q*X|Z[TE]Q*P|[MKJ]):', 'ZEQQQX:', TRUE}, - {'^(XXX|YYY|Z.Q*X|Z[TE]Q*P):', 'ZEQQQQQQQQQQQQQQQQQQP:', TRUE}, - {'^(XXX|YYY|Z.Q*X|Z[TE]Q*P):', 'ZEQQQX:', TRUE}, - {'^([TUV]+|XXX|YYY|Z.Q*X|Z[TE]Q*P):', 'ZEQQQQQQQQQQQQQQQQQQP:', TRUE}, - {'^([TUV]+|XXX|YYY|Z.Q*X|Z[TE]Q*P):', 'ZEQQQX:', TRUE}, - {'^([TUV]+|XXX|YYY|Z.Q*X|Z[TE]Q*P|[MKJ]):', 'ZEQQQQQQQQQQQQQQQQQQP:', TRUE}, - {'^([TUV]+|XXX|YYY|Z.Q*X|Z[TE]Q*P|[MKJ]):', 'ZEQQQX:', TRUE}, - {'X(?:ABCF[cC]x*|ABCD|ABCF):(?:DIT|DID|DIM)', 'XABCFCxxxxxxxxxx:DIM', TRUE}, - {'(((ABCD|ABCE|ABCF)))(A|B|C[xy]*):', 'ABCFCxxxxxxxxxx:DIM', TRUE}, - {'(?=foo)', 'foo', TRUE}, - {'(?=foo)', 'XfooY', TRUE}, - {'.*(?=foo)', 'XfooY', TRUE}, - {'(?=.*P)P', 'aP', TRUE}, - {'(?<=foo)', 'foo', TRUE}, - {'(?<=foo)', 'XfooY', TRUE}, - {'.*(?<=foo)', 'foo', TRUE}, - {'.*(?<=foo)', 'XfooY', TRUE}, - {'(?<=foo)Y', 'XfooY', TRUE}, - {'o(?<=foo)Y', '..XfooY..', TRUE}, - {'X(?=foo)f', '..XfooY..', TRUE}, - {'X(?=foo)', '..XfooY..', TRUE}, - {'X(?<=foo.)[YZ]', '..XfooXY..', TRUE}, - {'(?=XY*foo)', 'Xfoo', TRUE}, - {'^(?=XY*foo)', 'Xfoo', TRUE}, - {'^(<(?:[^<>]+|(?3)|(?1))*>)()(!>!>!>)$', '<!>!>><>>!>!>!>', TRUE}, - {'^(<(?:[^<>]+|(?1))*>)$', '<<><<<><>>>>', TRUE}, - {'((?2)*)([fF]o+)', 'fooFoFoo', TRUE}, - {'(<(?:[^<>]+|(?R))*>)', '<<><<<><>>>>', TRUE}, - {'(?foo|bar|baz)', 'snofooewa', TRUE}, - {'(?foo|bar|baz)(?[ew]+)', 'snofooewa', TRUE}, - {'(?foo)?(?()bar|nada)', 'foobar', TRUE}, - {'(?foo)?(?()bar|nada)', 'foo-barnada', TRUE}, - {'(?foo)?(?(1)bar|nada)', 'foo-barnada', TRUE}, - {'(?foo(?(R)bar))?(?1)', 'foofoobar', TRUE}, - {'(x)(?foo(?(R&A)bar))?(?&A)', 'xfoofoobar', TRUE}, - {'(x)(?foo(?(R2)bar))?(?&A)', 'xfoofoobar', TRUE}, - {'(?1)(?(DEFINE)(blah))', 'blah', TRUE}, - {'foo(?0)?bar', 'phoofoofoobarbarbarr', TRUE}, - {'foo(?R)?bar', 'phoofoofoobarbarbarr', TRUE}, - {'a++a', 'aaaaa', FALSE}, - {'a*+a', 'aaaaa', FALSE}, - {'a{1,5}+a', 'aaaaa', FALSE}, - {'a?+a', 'ab', FALSE}, - {'a++b', 'aaaaab', TRUE}, - {'a*+b', 'aaaaab', TRUE}, - {'a{1,5}+b', 'aaaaab', TRUE}, - {'a?+b', 'ab', TRUE}, - {'fooa++a', 'fooaaaaa', FALSE}, - {'fooa*+a', 'fooaaaaa', FALSE}, - {'fooa{1,5}+a', 'fooaaaaa', FALSE}, - {'fooa?+a', 'fooab', FALSE}, - {'fooa++b', 'fooaaaaab', TRUE}, - {'fooa*+b', 'fooaaaaab', TRUE}, - {'fooa{1,5}+b', 'fooaaaaab', TRUE}, - {'fooa?+b', 'fooab', TRUE}, - {'(?:aA)++(?:aA)', 'aAaAaAaAaA', FALSE}, - {'(aA)++(aA)', 'aAaAaAaAaA', FALSE}, - {'(aA|bB)++(aA|bB)', 'aAaAbBaAbB', FALSE}, - {'(?:aA|bB)++(?:aA|bB)', 'aAbBbBbBaA', FALSE}, - {'(?:aA)*+(?:aA)', 'aAaAaAaAaA', FALSE}, - {'(aA)*+(aA)', 'aAaAaAaAaA', FALSE}, - {'(aA|bB)*+(aA|bB)', 'aAaAbBaAaA', FALSE}, - {'(?:aA|bB)*+(?:aA|bB)', 'aAaAaAbBaA', FALSE}, - {'(?:aA){1,5}+(?:aA)', 'aAaAaAaAaA', FALSE}, - {'(aA){1,5}+(aA)', 'aAaAaAaAaA', FALSE}, - {'(aA|bB){1,5}+(aA|bB)', 'aAaAbBaAaA', FALSE}, - {'(?:aA|bB){1,5}+(?:aA|bB)', 'bBbBbBbBbB', FALSE}, - {'(?:aA)?+(?:aA)', 'aAb', FALSE}, - {'(aA)?+(aA)', 'aAb', FALSE}, - {'(aA|bB)?+(aA|bB)', 'bBb', FALSE}, - {'(?:aA|bB)?+(?:aA|bB)', 'aAb', FALSE}, - {'(?:aA)++b', 'aAaAaAaAaAb', TRUE}, - {'(aA)++b', 'aAaAaAaAaAb', TRUE}, - {'(aA|bB)++b', 'aAbBaAaAbBb', TRUE}, - {'(?:aA|bB)++b', 'aAbBbBaAaAb', TRUE}, - {'(?:aA)*+b', 'aAaAaAaAaAb', TRUE}, - {'(aA)*+b', 'aAaAaAaAaAb', TRUE}, - {'(aA|bB)*+b', 'bBbBbBbBbBb', TRUE}, - {'(?:aA|bB)*+b', 'bBaAbBbBaAb', TRUE}, - {'(?:aA){1,5}+b', 'aAaAaAaAaAb', TRUE}, - {'(aA){1,5}+b', 'aAaAaAaAaAb', TRUE}, - {'(aA|bB){1,5}+b', 'bBaAbBaAbBb', TRUE}, - {'(?:aA|bB){1,5}+b', 'aAbBaAbBbBb', TRUE}, - {'(?:aA)?+b', 'aAb', TRUE}, - {'(aA)?+b', 'aAb', TRUE}, - {'(aA|bB)?+b', 'bBb', TRUE}, - {'(?:aA|bB)?+b', 'bBb', TRUE}, - {'foo(?:aA)++(?:aA)', 'fooaAaAaAaAaA', FALSE}, - {'foo(aA)++(aA)', 'fooaAaAaAaAaA', FALSE}, - {'foo(aA|bB)++(aA|bB)', 'foobBbBbBaAaA', FALSE}, - {'foo(?:aA|bB)++(?:aA|bB)', 'fooaAaAaAaAaA', FALSE}, - {'foo(?:aA)*+(?:aA)', 'fooaAaAaAaAaA', FALSE}, - {'foo(aA)*+(aA)', 'fooaAaAaAaAaA', FALSE}, - {'foo(aA|bB)*+(aA|bB)', 'foobBaAbBaAaA', FALSE}, - {'foo(?:aA|bB)*+(?:aA|bB)', 'fooaAaAbBbBaA', FALSE}, - {'foo(?:aA){1,5}+(?:aA)', 'fooaAaAaAaAaA', FALSE}, - {'foo(aA){1,5}+(aA)', 'fooaAaAaAaAaA', FALSE}, - {'foo(aA|bB){1,5}+(aA|bB)', 'fooaAbBbBaAaA', FALSE}, - {'foo(?:aA|bB){1,5}+(?:aA|bB)', 'fooaAbBbBaAbB', FALSE}, - {'foo(?:aA)?+(?:aA)', 'fooaAb', FALSE}, - {'foo(aA)?+(aA)', 'fooaAb', FALSE}, - {'foo(aA|bB)?+(aA|bB)', 'foobBb', FALSE}, - {'foo(?:aA|bB)?+(?:aA|bB)', 'fooaAb', FALSE}, - {'foo(?:aA)++b', 'fooaAaAaAaAaAb', TRUE}, - {'foo(aA)++b', 'fooaAaAaAaAaAb', TRUE}, - {'foo(aA|bB)++b', 'foobBaAbBaAbBb', TRUE}, - {'foo(?:aA|bB)++b', 'fooaAaAbBaAaAb', TRUE}, - {'foo(?:aA)*+b', 'fooaAaAaAaAaAb', TRUE}, - {'foo(aA)*+b', 'fooaAaAaAaAaAb', TRUE}, - {'foo(aA|bB)*+b', 'foobBbBaAaAaAb', TRUE}, - {'foo(?:aA|bB)*+b', 'foobBaAaAbBaAb', TRUE}, - {'foo(?:aA){1,5}+b', 'fooaAaAaAaAaAb', TRUE}, - {'foo(aA){1,5}+b', 'fooaAaAaAaAaAb', TRUE}, - {'foo(aA|bB){1,5}+b', 'foobBaAaAaAaAb', TRUE}, - {'foo(?:aA|bB){1,5}+b', 'fooaAbBaAbBbBb', TRUE}, - {'foo(?:aA)?+b', 'fooaAb', TRUE}, - {'foo(aA)?+b', 'fooaAb', TRUE}, - {'foo(aA|bB)?+b', 'foobBb', TRUE}, - {'foo(?:aA|bB)?+b', 'foobBb', TRUE}, - {'([^()]++|\\([^()]*\\))+', '((abc(ade)ufh()()x', TRUE}, - {'round\\(([^()]++)\\)', '_I(round(xs * sz),1)', TRUE}, - {'(foo[1x]|bar[2x]|baz[3x])+y', 'foo1bar2baz3y', TRUE}, - {'(foo[1x]|bar[2x]|baz[3x])*y', 'foo1bar2baz3y', TRUE}, - {'([yX].|WORDS|[yX].|WORD)S', 'WORDS', TRUE}, - {'([yX].|WORDS|WORD|[xY].)S', 'WORDS', TRUE}, - {'(foo|fool|[zx].|money|parted)$', 'fool', TRUE}, - {'([zx].|foo|fool|[zq].|money|parted|[yx].)$', 'fool', TRUE}, - {'(foo|fool|[zx].|money|parted)$', 'fools', FALSE}, - {'([zx].|foo|fool|[qx].|money|parted|[py].)$', 'fools', FALSE}, - {'([yX].|WORDS|[yX].|WORD)+S', 'WORDS', TRUE}, - {'(WORDS|WORLD|WORD)+S', 'WORDS', TRUE}, - {'([yX].|WORDS|WORD|[xY].)+S', 'WORDS', TRUE}, - {'(foo|fool|[zx].|money|parted)+$', 'fool', TRUE}, - {'([zx].|foo|fool|[zq].|money|parted|[yx].)+$', 'fool', TRUE}, - {'(foo|fool|[zx].|money|parted)+$', 'fools', FALSE}, - {'([zx].|foo|fool|[qx].|money|parted|[py].)+$', 'fools', FALSE}, - {'(x|y|z[QW])+(longish|loquatious|excessive|overblown[QW])+', 'xyzQzWlongishoverblownW', TRUE}, - {'(x|y|z[QW])*(longish|loquatious|excessive|overblown[QW])*', 'xyzQzWlongishoverblownW', TRUE}, - {'(x|y|z[QW]){1,5}(longish|loquatious|excessive|overblown[QW]){1,5}', 'xyzQzWlongishoverblownW', TRUE}, - {'(x|y|z[QW])++(longish|loquatious|excessive|overblown[QW])++', 'xyzQzWlongishoverblownW', TRUE}, - {'(x|y|z[QW])*+(longish|loquatious|excessive|overblown[QW])*+', 'xyzQzWlongishoverblownW', TRUE}, - {'(x|y|z[QW]){1,5}+(longish|loquatious|excessive|overblown[QW]){1,5}+', 'xyzQzWlongishoverblownW', TRUE}, - {'a*(?!)', 'aaaab', FALSE}, - {'a*(*FAIL)', 'aaaab', FALSE}, - {'a*(*F)', 'aaaab', FALSE}, - {'(A(A|B(*ACCEPT)|C)D)(E)', 'AB', TRUE}, - {'(A(A|B(*ACCEPT)|C)D)(E)', 'ACDE', TRUE}, - {'(a)(?:(?-1)|(?+1))(b)', 'aab', TRUE}, - {'(a)(?:(?-1)|(?+1))(b)', 'abb', TRUE}, - {'(a)(?:(?-1)|(?+1))(b)', 'acb', FALSE}, - {'(foo)(\\g-2)', 'foofoo', TRUE}, - {'(foo)(\\g-2)(foo)(\\g-2)', 'foofoofoofoo', TRUE}, - {'(([abc]+) \\g-1)(([abc]+) \\g{-1})', 'abc abccba cba', TRUE}, - {'(a)(b)(c)\\g1\\g2\\g3', 'abcabc', TRUE}, - {'(?<=bar>)foo', 'bar>foo', TRUE}, - {'(?)foo', 'bar>foo', FALSE}, - {'(?<=bar>ABC)foo', 'bar>ABCfoo', TRUE}, - {'(?ABC)foo', 'bar>ABCfoo', FALSE}, - {'(?)foo', 'bar>ABCfoo', TRUE}, - {'(?ABC)foo', 'bar>ABCfoo', TRUE}, - {'(?<=abcd(?<=(aaaabcd)))', '..aaaabcd..', TRUE}, - {'(?=xy(?<=(aaxy)))', '..aaxy..', TRUE}, - {'X(\\w+)(?=\\s)|X(\\w+)', 'Xab', TRUE}, - {'(?|(a))', 'a', TRUE}, - {'(?|a(.)b|d(.(o).)d|i(.)(.)j)(.)', 'd!o!da', TRUE}, - {'(?|a(.)b|d(.(o).)d|i(.)(.)j)(.)', 'aabc', TRUE}, - {'(?|a(.)b|d(.(o).)d|i(.)(.)j)(.)', 'ixyjp', TRUE}, - {'(?|(?|(a)|(b))|(?|(c)|(d)))', 'a', TRUE}, - {'(?|(?|(a)|(b))|(?|(c)|(d)))', 'b', TRUE}, - {'(?|(?|(a)|(b))|(?|(c)|(d)))', 'c', TRUE}, - {'(?|(?|(a)|(b))|(?|(c)|(d)))', 'd', TRUE}, - {'(.)(?|(.)(.)x|(.)d)(.)', 'abcde', TRUE}, - {'(\n)(?|(\n)(\n)x|(\n)d)(\n)', 'abcde', TRUE}, - {'(?|(?x))', 'x', TRUE}, - {'(?)(?|(?x))', 'x', TRUE}, - {'(?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a))', 'a', TRUE}, - {'(?(DEFINE)(?(?&B)+)(?a))(?&A)', 'a', TRUE}, - {'(?(DEFINE)(?(?&B)+)(?a))(?&A)', 'aa', TRUE}, - {'foo(\\R)bar', 'foo\\r\nbar', TRUE}, - {'foo(\\R)bar', 'foo\nbar', TRUE}, - {'foo(\\R)bar', 'foo\\rbar', TRUE}, - {'foo(\\R+)bar', 'foo\\r\n\\x{85}\\r\n\nbar', TRUE}, - {'(\\V+)(\\R)', 'foo\\r\n\\x{85}\\r\n\nbar', TRUE}, - {'(\\R+)(\\V)', 'foo\\r\n\\x{85}\\r\n\nbar', TRUE}, - {'foo(\\R)bar', 'foo\\x{85}bar', TRUE}, - {'(\\V)(\\R)', 'foo\\x{85}bar', TRUE}, - {'(\\R)(\\V)', 'foo\\x{85}bar', TRUE}, - {'(\\V)(\\R)', 'foo\\r\nbar', TRUE}, - {'(\\R)(\\V)', 'foo\\r\nbar', TRUE}, - {'(\\V)(\\R)', 'foo\\rbar', TRUE}, - {'(\\R)(\\V)', 'foo\\rbar', TRUE}, - {'0|\\R??\n0', '\n\n', FALSE}, - {'foo(\\v+)bar', 'foo\\r\n\\x{85}\\r\n\nbar', TRUE}, - {'(\\v+)(\\V)', 'foo\\r\n\\x{85}\\r\n\nbar', TRUE}, - {'foo(\\v)bar', 'foo\\x{85}bar', TRUE}, - {'(\\v)(\\V)', 'foo\\x{85}bar', TRUE}, - {'foo(\\v)bar', 'foo\\rbar', TRUE}, - {'(\\v)(\\V)', 'foo\\rbar', TRUE}, - {'foo(\\h+)bar', 'foo\\t\\x{A0}bar', TRUE}, - {'(\\h+)(\\H)', 'foo\\t\\x{A0}bar', TRUE}, - {'foo(\\h)bar', 'foo\\x{A0}bar', TRUE}, - {'(\\h)(\\H)', 'foo\\x{A0}bar', TRUE}, - {'foo(\\h)bar', 'foo\\tbar', TRUE}, - {'(\\h)(\\H)', 'foo\\tbar', TRUE}, - {'.*\\z', 'foo\n', TRUE}, - {'\n*\\z', 'foo\n', TRUE}, - {'^(?:(\\d)x)?\\d$', '1', TRUE}, - {'.*?(?:(\\w)|(\\w))x', 'abx', TRUE}, - {'0{50}', '000000000000000000000000000000000000000000000000000', TRUE}, - {'^a?(?=b)b', 'ab', TRUE}, - {'^a*(?=b)b', 'ab', TRUE}, - {'[\\s][\\S]', '\\x{a0}\\x{a0}', FALSE}, - {'abc\n\\{U+BEEF\\}', 'abc.{UBEEF}', TRUE}, - {'abc\n', 'abcd', TRUE}, - {'abc\n', 'abc\n', FALSE}, - {'\\c@', '\\0', TRUE}, - {'\\cA', '\\001', TRUE}, - {'\\cB', '\\002', TRUE}, - {'\\cC', '\\003', TRUE}, - {'\\cI', '\\011', TRUE}, - {'\\cJ', '\\012', TRUE}, - {'\\cR', '\\022', TRUE}, - {'\\cS', '\\023', TRUE}, - {'\\cX', '\\030', TRUE}, - {'\\cY', '\\031', TRUE}, - {'\\cZ', '\\032', TRUE}, - {'\\c[', '\\033', TRUE}, - {'\\c\\X', '\\034X', TRUE}, - {'\\c]', '\\035', TRUE}, - {'\\c^', '\\036', TRUE}, - {'\\c_', '\\037', TRUE}, - {'\\o{120}', '\\x{50}', TRUE}, - {'[a\\o{120}]', '\\x{50}', TRUE}, - {'[\\006]', '\\006', TRUE}, - {'[\\006]', '6\\000', FALSE}, - {'[\\0005]', '\\0005', TRUE}, - {'[\\0005]', '5\\000', TRUE}, - {'[\\_]', '_', TRUE}, - {'(q1|.)*(q2|.)*(x(a|bc)*y){2,}', 'xayxay', TRUE}, - {'(q1|.)*(q2|.)*(x(a|bc)*y){2,3}', 'xayxay', TRUE}, - {'(q1|z)*(q2|z)*z{15}-.*?(x(a|bc)*y){2,3}Z', 'zzzzzzzzzzzzzzzz-xayxayxayxayZ', TRUE}, - {'(?:(?:)foo|bar|zot|rt78356)', 'foo', TRUE}, - {'^m?(\\S)(.*)\\1$', 'aba', TRUE}, - {'^m?(\\S)(.*)\\1$', '\\tb\\t', FALSE}, - {'^m?(\\s)(.*)\\1$', '\\tb\\t', TRUE}, - {'^m?(\\s)(.*)\\1$', 'aba', FALSE}, - {'^m?(\\W)(.*)\\1$', ':b:', TRUE}, - {'^m?(\\W)(.*)\\1$', 'aba', FALSE}, - {'^m?(\\w)(.*)\\1$', 'aba', TRUE}, - {'^m?(\\w)(.*)\\1$', ':b:', FALSE}, - {'^m?(\\D)(.*)\\1$', 'aba', TRUE}, - {'^m?(\\D)(.*)\\1$', '5b5', FALSE}, - {'^m?(\\d)(.*)\\1$', '5b5', TRUE}, - {'^m?(\\d)(.*)\\1$', 'aba', FALSE}, - {'^_?[^\\W_0-9]\\w\\z', '\\xAA\\x{100}', TRUE}, - {'(?#( (?{1+)a', 'a', TRUE}, - {'ab[(?{1]', 'ab1', TRUE}, - {'ab[(?{1\\](?{2]', 'ab2', TRUE}, - {'[^\\p{Alphabetic}]', '\\x{100}', FALSE}, - {'^(.)(?:(..)|B)[CX]', 'ABCDE', TRUE}, - {'^(.)(?:BC(.)|B)[CX]', 'ABCDE', TRUE}, - {'^(.)(?:(.)+)*[BX]', 'ABCDE', TRUE}, - {'^(.)(BC)*', 'ABCDE', TRUE}, - {'^(.)(BC)*[BX]', 'ABCDE', TRUE}, - {'^(.)(B)*.[DX]', 'ABCDE', TRUE}, - {'^(.)(B)*.[CX]', 'ABCDE', TRUE}, - {'^(?:(X)?(\\d)|(X)?(\\d\\d))$', 'X12', TRUE}, - {'^(?:(XX)?(\\d)|(XX)?(\\d\\d))$', 'XX12', TRUE}, - {'\\A(?>\\[(?:(?:)(?:R){1}|T|V?|A)\\])\\z', '[A]', TRUE}, - {'[^\n]+', '\nb', TRUE}, - {'[^\n]+', 'a\n', TRUE}, - {'\\w', '\\x{200C}', TRUE}, - {'\\W', '\\x{200C}', FALSE}, - {'\\w', '\\x{200D}', TRUE}, - {'\\W', '\\x{200D}', FALSE}, - {'^\\R{2}$', '\\r\n\\r\n', TRUE}, - {'\\Vn', '\\xFFn/', TRUE}, - {'^_?[^\\S_0-9]\\w*\\z', '\\t', TRUE}, - {'a?\\X', 'a\\x{100}', TRUE}, - {'a?\\R', 'a\n', TRUE}, - {'^a?\n$', 'a\n', TRUE}, - {'\n?a', '\na', TRUE}, - {'(A(*PRUNE)B|A(*PRUNE)C)', 'AC', FALSE}, - {'(A(*PRUNE)B|A(*PRUNE)D|A(*PRUNE)C)', 'AC', FALSE}, - {'(A(*PRUNE)B|A(*PRUNE)C|A(*PRUNE)D)', 'AC', FALSE}, - {'((A(*PRUNE)B|A(*PRUNE)C))', 'AC', FALSE}, - {'((A(*PRUNE)B|A(*PRUNE)D|A(*PRUNE)C))', 'AC', FALSE}, - {'((A(*PRUNE)B|A(*PRUNE)C|A(*PRUNE)D))', 'AC', FALSE}, - {'A+?(*THEN)BC', 'AAABC', TRUE}, - {'A+?(*PRUNE)BC', 'AAABC', TRUE}, - {'A+(*THEN)BC', 'AAABC', TRUE}, - {'A+(*PRUNE)BC', 'AAABC', TRUE}, - {'^(?=(a)){0}b(?1)', 'back', TRUE}, - {'(?:(a(*SKIP)b)){0}(?:(?1)|ac)', 'x', FALSE}, - {'(?1)(?:(b)){0}', 'b', TRUE}, - {'(?a)(?(?=(?&W))(?<=(?&W)))(?&BB)', 'aa', TRUE}, - {'^x?abc?de', 'abcde', TRUE}, - {'\'(?-m:^abc)\'m', 'abcde', TRUE}, - {'\'(?-m:^abc)\'m', 'x\nabcde', FALSE}, - {'\\d<(.*?)>', 'a<>', FALSE}, - {'[bcd].{2,3}aaaa', 'XbXaaaaa', TRUE}, - {'[bcd].{2,3}aaaa', 'Xb\\x{100}aaaaa', TRUE}, - {'\'\\Awibble\\z\'m', 'wibble', TRUE}, - {'^((?(?=x)xb|ya)z)', 'xbz', TRUE}, - {'^((?(?=x)xb|ya)z)', 'yaz', TRUE}, - {'^((?(?!y)xb|ya)z)', 'xbz', TRUE}, - {'^((?(?!y)xb|ya)z)', 'yaz', TRUE}, - {'^((?(?!)xb|ya)z)', 'xbz', FALSE}, - {'^((?(?!)xb|ya)z)', 'yaz', TRUE}, - {'ab(?#Comment){2}c', 'abbc', TRUE}, - {'(?:.||)(?|)000000000@', '000000000@', TRUE}, - {'aa$|a(?R)a|a', 'aaa', TRUE}, - {'(?:\\1|a)([bcd])\\1(?:(?R)|e)\\1', 'abbaccaddedcb', TRUE}, - {'(.*?(a(a)|i(i))n)', 'riiaan', TRUE}, - {'(^(?:(\\d)x)?\\d$)', '1', TRUE}, - {'(X{2,}[-X]{1,4}){3,}X{2,}', 'XXX-XXX-XXX--', FALSE}, - {'^a?bcd\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', FALSE}, - {'^Xaaa?Xaa', 'aaa\\x{400000}', FALSE}, - {'^(\\d+)*?4X$', '1234X', TRUE}, - {'\\A([\\x00-\\x7F]+)(.*)\\z', '\\007\\011\\012', TRUE}, - {'^((\\w|<(\\s)*(?1)(?3)*>)(?:(?3)*\\+(?3)*(?2))*)(?3)*\\+', 'a + b + ', TRUE}, - {'^((\\w|<(\\s)*(?1)(?3)*>)(?:(?3)*\\+(?3)*(?2))*)(?3)*\\+', 'a + + c', TRUE}, - {'(?<=(?