123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760 |
- /-- This set of tests is for features that are compatible with all versions of
- Perl >= 5.10, in non-UTF-8 mode. It should run clean for the 8-bit, 16-bit,
- and 32-bit PCRE libraries. --/
-
- < forbid 89?=ABCDEFfGILMNPTUWXZ<
- /the quick brown fox/
- the quick brown fox
- The quick brown FOX
- What do you know about the quick brown fox?
- What do you know about THE QUICK BROWN FOX?
- /The quick brown fox/i
- the quick brown fox
- The quick brown FOX
- What do you know about the quick brown fox?
- What do you know about THE QUICK BROWN FOX?
- /abcd\t\n\r\f\a\e\071\x3b\$\\\?caxyz/
- abcd\t\n\r\f\a\e9;\$\\?caxyz
- /a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz/
- abxyzpqrrrabbxyyyypqAzz
- abxyzpqrrrabbxyyyypqAzz
- aabxyzpqrrrabbxyyyypqAzz
- aaabxyzpqrrrabbxyyyypqAzz
- aaaabxyzpqrrrabbxyyyypqAzz
- abcxyzpqrrrabbxyyyypqAzz
- aabcxyzpqrrrabbxyyyypqAzz
- aaabcxyzpqrrrabbxyyyypAzz
- aaabcxyzpqrrrabbxyyyypqAzz
- aaabcxyzpqrrrabbxyyyypqqAzz
- aaabcxyzpqrrrabbxyyyypqqqAzz
- aaabcxyzpqrrrabbxyyyypqqqqAzz
- aaabcxyzpqrrrabbxyyyypqqqqqAzz
- aaabcxyzpqrrrabbxyyyypqqqqqqAzz
- aaaabcxyzpqrrrabbxyyyypqAzz
- abxyzzpqrrrabbxyyyypqAzz
- aabxyzzzpqrrrabbxyyyypqAzz
- aaabxyzzzzpqrrrabbxyyyypqAzz
- aaaabxyzzzzpqrrrabbxyyyypqAzz
- abcxyzzpqrrrabbxyyyypqAzz
- aabcxyzzzpqrrrabbxyyyypqAzz
- aaabcxyzzzzpqrrrabbxyyyypqAzz
- aaaabcxyzzzzpqrrrabbxyyyypqAzz
- aaaabcxyzzzzpqrrrabbbxyyyypqAzz
- aaaabcxyzzzzpqrrrabbbxyyyyypqAzz
- aaabcxyzpqrrrabbxyyyypABzz
- aaabcxyzpqrrrabbxyyyypABBzz
- >>>aaabxyzpqrrrabbxyyyypqAzz
- >aaaabxyzpqrrrabbxyyyypqAzz
- >>>>abcxyzpqrrrabbxyyyypqAzz
- *** Failers
- abxyzpqrrabbxyyyypqAzz
- abxyzpqrrrrabbxyyyypqAzz
- abxyzpqrrrabxyyyypqAzz
- aaaabcxyzzzzpqrrrabbbxyyyyyypqAzz
- aaaabcxyzzzzpqrrrabbbxyyypqAzz
- aaabcxyzpqrrrabbxyyyypqqqqqqqAzz
- /^(abc){1,2}zz/
- abczz
- abcabczz
- *** Failers
- zz
- abcabcabczz
- >>abczz
- /^(b+?|a){1,2}?c/
- bc
- bbc
- bbbc
- bac
- bbac
- aac
- abbbbbbbbbbbc
- bbbbbbbbbbbac
- *** Failers
- aaac
- abbbbbbbbbbbac
- /^(b+|a){1,2}c/
- bc
- bbc
- bbbc
- bac
- bbac
- aac
- abbbbbbbbbbbc
- bbbbbbbbbbbac
- *** Failers
- aaac
- abbbbbbbbbbbac
- /^(b+|a){1,2}?bc/
- bbc
- /^(b*|ba){1,2}?bc/
- babc
- bbabc
- bababc
- *** Failers
- bababbc
- babababc
- /^(ba|b*){1,2}?bc/
- babc
- bbabc
- bababc
- *** Failers
- bababbc
- babababc
- /^\ca\cA\c[;\c:/
- \x01\x01\e;z
- /^[ab\]cde]/
- athing
- bthing
- ]thing
- cthing
- dthing
- ething
- *** Failers
- fthing
- [thing
- \\thing
- /^[]cde]/
- ]thing
- cthing
- dthing
- ething
- *** Failers
- athing
- fthing
- /^[^ab\]cde]/
- fthing
- [thing
- \\thing
- *** Failers
- athing
- bthing
- ]thing
- cthing
- dthing
- ething
- /^[^]cde]/
- athing
- fthing
- *** Failers
- ]thing
- cthing
- dthing
- ething
- /^\�/
- �
- /^ÿ/
- ÿ
- /^[0-9]+$/
- 0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 100
- *** Failers
- abc
- /^.*nter/
- enter
- inter
- uponter
- /^xxx[0-9]+$/
- xxx0
- xxx1234
- *** Failers
- xxx
- /^.+[0-9][0-9][0-9]$/
- x123
- xx123
- 123456
- *** Failers
- 123
- x1234
- /^.+?[0-9][0-9][0-9]$/
- x123
- xx123
- 123456
- *** Failers
- 123
- x1234
- /^([^!]+)!(.+)=apquxz\.ixr\.zzz\.ac\.uk$/
- abc!pqr=apquxz.ixr.zzz.ac.uk
- *** Failers
- !pqr=apquxz.ixr.zzz.ac.uk
- abc!=apquxz.ixr.zzz.ac.uk
- abc!pqr=apquxz:ixr.zzz.ac.uk
- abc!pqr=apquxz.ixr.zzz.ac.ukk
- /:/
- Well, we need a colon: somewhere
- *** Fail if we don't
- /([\da-f:]+)$/i
- 0abc
- abc
- fed
- E
- ::
- 5f03:12C0::932e
- fed def
- Any old stuff
- *** Failers
- 0zzz
- gzzz
- fed\x20
- Any old rubbish
- /^.*\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/
- .1.2.3
- A.12.123.0
- *** Failers
- .1.2.3333
- 1.2.3
- 1234.2.3
- /^(\d+)\s+IN\s+SOA\s+(\S+)\s+(\S+)\s*\(\s*$/
- 1 IN SOA non-sp1 non-sp2(
- 1 IN SOA non-sp1 non-sp2 (
- *** Failers
- 1IN SOA non-sp1 non-sp2(
- /^[a-zA-Z\d][a-zA-Z\d\-]*(\.[a-zA-Z\d][a-zA-z\d\-]*)*\.$/
- a.
- Z.
- 2.
- ab-c.pq-r.
- sxk.zzz.ac.uk.
- x-.y-.
- *** Failers
- -abc.peq.
- /^\*\.[a-z]([a-z\-\d]*[a-z\d]+)?(\.[a-z]([a-z\-\d]*[a-z\d]+)?)*$/
- *.a
- *.b0-a
- *.c3-b.c
- *.c-a.b-c
- *** Failers
- *.0
- *.a-
- *.a-b.c-
- *.c-a.0-c
- /^(?=ab(de))(abd)(e)/
- abde
- /^(?!(ab)de|x)(abd)(f)/
- abdf
- /^(?=(ab(cd)))(ab)/
- abcd
- /^[\da-f](\.[\da-f])*$/i
- a.b.c.d
- A.B.C.D
- a.b.c.1.2.3.C
- /^\".*\"\s*(;.*)?$/
- \"1234\"
- \"abcd\" ;
- \"\" ; rhubarb
- *** Failers
- \"1234\" : things
- /^$/
- \
- *** Failers
- / ^ a (?# begins with a) b\sc (?# then b c) $ (?# then end)/x
- ab c
- *** Failers
- abc
- ab cde
- /(?x) ^ a (?# begins with a) b\sc (?# then b c) $ (?# then end)/
- ab c
- *** Failers
- abc
- ab cde
- /^ a\ b[c ]d $/x
- a bcd
- a b d
- *** Failers
- abcd
- ab d
- /^(a(b(c)))(d(e(f)))(h(i(j)))(k(l(m)))$/
- abcdefhijklm
- /^(?:a(b(c)))(?:d(e(f)))(?:h(i(j)))(?:k(l(m)))$/
- abcdefhijklm
- /^[\w][\W][\s][\S][\d][\D][\b][\n][\c]][\022]/
- a+ Z0+\x08\n\x1d\x12
- /^[.^$|()*+?{,}]+/
- .^\$(*+)|{?,?}
- /^a*\w/
- z
- az
- aaaz
- a
- aa
- aaaa
- a+
- aa+
- /^a*?\w/
- z
- az
- aaaz
- a
- aa
- aaaa
- a+
- aa+
- /^a+\w/
- az
- aaaz
- aa
- aaaa
- aa+
- /^a+?\w/
- az
- aaaz
- aa
- aaaa
- aa+
- /^\d{8}\w{2,}/
- 1234567890
- 12345678ab
- 12345678__
- *** Failers
- 1234567
- /^[aeiou\d]{4,5}$/
- uoie
- 1234
- 12345
- aaaaa
- *** Failers
- 123456
- /^[aeiou\d]{4,5}?/
- uoie
- 1234
- 12345
- aaaaa
- 123456
- /\A(abc|def)=(\1){2,3}\Z/
- abc=abcabc
- def=defdefdef
- *** Failers
- abc=defdef
- /^(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\11*(\3\4)\1(?#)2$/
- abcdefghijkcda2
- abcdefghijkkkkcda2
- /(cat(a(ract|tonic)|erpillar)) \1()2(3)/
- cataract cataract23
- catatonic catatonic23
- caterpillar caterpillar23
- /^From +([^ ]+) +[a-zA-Z][a-zA-Z][a-zA-Z] +[a-zA-Z][a-zA-Z][a-zA-Z] +[0-9]?[0-9] +[0-9][0-9]:[0-9][0-9]/
- From abcd Mon Sep 01 12:33:02 1997
- /^From\s+\S+\s+([a-zA-Z]{3}\s+){2}\d{1,2}\s+\d\d:\d\d/
- From abcd Mon Sep 01 12:33:02 1997
- From abcd Mon Sep 1 12:33:02 1997
- *** Failers
- From abcd Sep 01 12:33:02 1997
- /^12.34/s
- 12\n34
- 12\r34
- /\w+(?=\t)/
- the quick brown\t fox
- /foo(?!bar)(.*)/
- foobar is foolish see?
- /(?:(?!foo)...|^.{0,2})bar(.*)/
- foobar crowbar etc
- barrel
- 2barrel
- A barrel
- /^(\D*)(?=\d)(?!123)/
- abc456
- *** Failers
- abc123
- /^1234(?# test newlines
- inside)/
- 1234
- /^1234 #comment in extended re
- /x
- 1234
- /#rhubarb
- abcd/x
- abcd
- /^abcd#rhubarb/x
- abcd
- /^(a)\1{2,3}(.)/
- aaab
- aaaab
- aaaaab
- aaaaaab
- /(?!^)abc/
- the abc
- *** Failers
- abc
- /(?=^)abc/
- abc
- *** Failers
- the abc
- /^[ab]{1,3}(ab*|b)/
- aabbbbb
- /^[ab]{1,3}?(ab*|b)/
- aabbbbb
- /^[ab]{1,3}?(ab*?|b)/
- aabbbbb
- /^[ab]{1,3}(ab*?|b)/
- aabbbbb
- / (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* # optional leading comment
- (?: (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- |
- " (?: # opening quote...
- [^\\\x80-\xff\n\015"] # Anything except backslash and quote
- | # or
- \\ [^\x80-\xff] # Escaped something (something != CR)
- )* " # closing quote
- ) # initial word
- (?: (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* \. (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- |
- " (?: # opening quote...
- [^\\\x80-\xff\n\015"] # Anything except backslash and quote
- | # or
- \\ [^\x80-\xff] # Escaped something (something != CR)
- )* " # closing quote
- ) )* # further okay, if led by a period
- (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* @ (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- | \[ # [
- (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
- \] # ]
- ) # initial subdomain
- (?: #
- (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* \. # if led by a period...
- (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- | \[ # [
- (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
- \] # ]
- ) # ...further okay
- )*
- # address
- | # or
- (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- |
- " (?: # opening quote...
- [^\\\x80-\xff\n\015"] # Anything except backslash and quote
- | # or
- \\ [^\x80-\xff] # Escaped something (something != CR)
- )* " # closing quote
- ) # one word, optionally followed by....
- (?:
- [^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] | # atom and space parts, or...
- \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) | # comments, or...
- " (?: # opening quote...
- [^\\\x80-\xff\n\015"] # Anything except backslash and quote
- | # or
- \\ [^\x80-\xff] # Escaped something (something != CR)
- )* " # closing quote
- # quoted strings
- )*
- < (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* # leading <
- (?: @ (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- | \[ # [
- (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
- \] # ]
- ) # initial subdomain
- (?: #
- (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* \. # if led by a period...
- (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- | \[ # [
- (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
- \] # ]
- ) # ...further okay
- )*
- (?: (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* , (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* @ (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- | \[ # [
- (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
- \] # ]
- ) # initial subdomain
- (?: #
- (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* \. # if led by a period...
- (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- | \[ # [
- (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
- \] # ]
- ) # ...further okay
- )*
- )* # further okay, if led by comma
- : # closing colon
- (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* )? # optional route
- (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- |
- " (?: # opening quote...
- [^\\\x80-\xff\n\015"] # Anything except backslash and quote
- | # or
- \\ [^\x80-\xff] # Escaped something (something != CR)
- )* " # closing quote
- ) # initial word
- (?: (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* \. (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- |
- " (?: # opening quote...
- [^\\\x80-\xff\n\015"] # Anything except backslash and quote
- | # or
- \\ [^\x80-\xff] # Escaped something (something != CR)
- )* " # closing quote
- ) )* # further okay, if led by a period
- (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* @ (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- | \[ # [
- (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
- \] # ]
- ) # initial subdomain
- (?: #
- (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* \. # if led by a period...
- (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- | \[ # [
- (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
- \] # ]
- ) # ...further okay
- )*
- # address spec
- (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* > # trailing >
- # name and address
- ) (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* # optional trailing comment
- /x
- Alan Other <user\@dom.ain>
- <user\@dom.ain>
- user\@dom.ain
- \"A. Other\" <user.1234\@dom.ain> (a comment)
- A. Other <user.1234\@dom.ain> (a comment)
- \"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"\@x400-re.lay
- A missing angle <user\@some.where
- *** Failers
- The quick brown fox
- /[\040\t]* # Nab whitespace.
- (?:
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: # (
- (?: \\ [^\x80-\xff] |
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
- \) # )
- ) # special
- [^\\\x80-\xff\n\015()] * # normal*
- )* # )*
- \) # )
- [\040\t]* )* # If comment found, allow more spaces.
- # optional leading comment
- (?:
- (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- # Atom
- | # or
- " # "
- [^\\\x80-\xff\n\015"] * # normal
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
- " # "
- # Quoted string
- )
- [\040\t]* # Nab whitespace.
- (?:
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: # (
- (?: \\ [^\x80-\xff] |
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
- \) # )
- ) # special
- [^\\\x80-\xff\n\015()] * # normal*
- )* # )*
- \) # )
- [\040\t]* )* # If comment found, allow more spaces.
- (?:
- \.
- [\040\t]* # Nab whitespace.
- (?:
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: # (
- (?: \\ [^\x80-\xff] |
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
- \) # )
- ) # special
- [^\\\x80-\xff\n\015()] * # normal*
- )* # )*
- \) # )
- [\040\t]* )* # If comment found, allow more spaces.
- (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- # Atom
- | # or
- " # "
- [^\\\x80-\xff\n\015"] * # normal
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
- " # "
- # Quoted string
- )
- [\040\t]* # Nab whitespace.
- (?:
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: # (
- (?: \\ [^\x80-\xff] |
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
- \) # )
- ) # special
- [^\\\x80-\xff\n\015()] * # normal*
- )* # )*
- \) # )
- [\040\t]* )* # If comment found, allow more spaces.
- # additional words
- )*
- @
- [\040\t]* # Nab whitespace.
- (?:
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: # (
- (?: \\ [^\x80-\xff] |
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
- \) # )
- ) # special
- [^\\\x80-\xff\n\015()] * # normal*
- )* # )*
- \) # )
- [\040\t]* )* # If comment found, allow more spaces.
- (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- |
- \[ # [
- (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
- \] # ]
- )
- [\040\t]* # Nab whitespace.
- (?:
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: # (
- (?: \\ [^\x80-\xff] |
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
- \) # )
- ) # special
- [^\\\x80-\xff\n\015()] * # normal*
- )* # )*
- \) # )
- [\040\t]* )* # If comment found, allow more spaces.
- # optional trailing comments
- (?:
- \.
- [\040\t]* # Nab whitespace.
- (?:
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: # (
- (?: \\ [^\x80-\xff] |
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
- \) # )
- ) # special
- [^\\\x80-\xff\n\015()] * # normal*
- )* # )*
- \) # )
- [\040\t]* )* # If comment found, allow more spaces.
- (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- |
- \[ # [
- (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
- \] # ]
- )
- [\040\t]* # Nab whitespace.
- (?:
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: # (
- (?: \\ [^\x80-\xff] |
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
- \) # )
- ) # special
- [^\\\x80-\xff\n\015()] * # normal*
- )* # )*
- \) # )
- [\040\t]* )* # If comment found, allow more spaces.
- # optional trailing comments
- )*
- # address
- | # or
- (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- # Atom
- | # or
- " # "
- [^\\\x80-\xff\n\015"] * # normal
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
- " # "
- # Quoted string
- )
- # leading word
- [^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] * # "normal" atoms and or spaces
- (?:
- (?:
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: # (
- (?: \\ [^\x80-\xff] |
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
- \) # )
- ) # special
- [^\\\x80-\xff\n\015()] * # normal*
- )* # )*
- \) # )
- |
- " # "
- [^\\\x80-\xff\n\015"] * # normal
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
- " # "
- ) # "special" comment or quoted string
- [^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] * # more "normal"
- )*
- <
- [\040\t]* # Nab whitespace.
- (?:
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: # (
- (?: \\ [^\x80-\xff] |
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
- \) # )
- ) # special
- [^\\\x80-\xff\n\015()] * # normal*
- )* # )*
- \) # )
- [\040\t]* )* # If comment found, allow more spaces.
- # <
- (?:
- @
- [\040\t]* # Nab whitespace.
- (?:
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: # (
- (?: \\ [^\x80-\xff] |
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
- \) # )
- ) # special
- [^\\\x80-\xff\n\015()] * # normal*
- )* # )*
- \) # )
- [\040\t]* )* # If comment found, allow more spaces.
- (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- |
- \[ # [
- (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
- \] # ]
- )
- [\040\t]* # Nab whitespace.
- (?:
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: # (
- (?: \\ [^\x80-\xff] |
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
- \) # )
- ) # special
- [^\\\x80-\xff\n\015()] * # normal*
- )* # )*
- \) # )
- [\040\t]* )* # If comment found, allow more spaces.
- # optional trailing comments
- (?:
- \.
- [\040\t]* # Nab whitespace.
- (?:
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: # (
- (?: \\ [^\x80-\xff] |
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
- \) # )
- ) # special
- [^\\\x80-\xff\n\015()] * # normal*
- )* # )*
- \) # )
- [\040\t]* )* # If comment found, allow more spaces.
- (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- |
- \[ # [
- (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
- \] # ]
- )
- [\040\t]* # Nab whitespace.
- (?:
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: # (
- (?: \\ [^\x80-\xff] |
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
- \) # )
- ) # special
- [^\\\x80-\xff\n\015()] * # normal*
- )* # )*
- \) # )
- [\040\t]* )* # If comment found, allow more spaces.
- # optional trailing comments
- )*
- (?: ,
- [\040\t]* # Nab whitespace.
- (?:
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: # (
- (?: \\ [^\x80-\xff] |
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
- \) # )
- ) # special
- [^\\\x80-\xff\n\015()] * # normal*
- )* # )*
- \) # )
- [\040\t]* )* # If comment found, allow more spaces.
- @
- [\040\t]* # Nab whitespace.
- (?:
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: # (
- (?: \\ [^\x80-\xff] |
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
- \) # )
- ) # special
- [^\\\x80-\xff\n\015()] * # normal*
- )* # )*
- \) # )
- [\040\t]* )* # If comment found, allow more spaces.
- (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- |
- \[ # [
- (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
- \] # ]
- )
- [\040\t]* # Nab whitespace.
- (?:
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: # (
- (?: \\ [^\x80-\xff] |
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
- \) # )
- ) # special
- [^\\\x80-\xff\n\015()] * # normal*
- )* # )*
- \) # )
- [\040\t]* )* # If comment found, allow more spaces.
- # optional trailing comments
- (?:
- \.
- [\040\t]* # Nab whitespace.
- (?:
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: # (
- (?: \\ [^\x80-\xff] |
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
- \) # )
- ) # special
- [^\\\x80-\xff\n\015()] * # normal*
- )* # )*
- \) # )
- [\040\t]* )* # If comment found, allow more spaces.
- (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- |
- \[ # [
- (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
- \] # ]
- )
- [\040\t]* # Nab whitespace.
- (?:
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: # (
- (?: \\ [^\x80-\xff] |
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
- \) # )
- ) # special
- [^\\\x80-\xff\n\015()] * # normal*
- )* # )*
- \) # )
- [\040\t]* )* # If comment found, allow more spaces.
- # optional trailing comments
- )*
- )* # additional domains
- :
- [\040\t]* # Nab whitespace.
- (?:
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: # (
- (?: \\ [^\x80-\xff] |
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
- \) # )
- ) # special
- [^\\\x80-\xff\n\015()] * # normal*
- )* # )*
- \) # )
- [\040\t]* )* # If comment found, allow more spaces.
- # optional trailing comments
- )? # optional route
- (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- # Atom
- | # or
- " # "
- [^\\\x80-\xff\n\015"] * # normal
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
- " # "
- # Quoted string
- )
- [\040\t]* # Nab whitespace.
- (?:
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: # (
- (?: \\ [^\x80-\xff] |
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
- \) # )
- ) # special
- [^\\\x80-\xff\n\015()] * # normal*
- )* # )*
- \) # )
- [\040\t]* )* # If comment found, allow more spaces.
- (?:
- \.
- [\040\t]* # Nab whitespace.
- (?:
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: # (
- (?: \\ [^\x80-\xff] |
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
- \) # )
- ) # special
- [^\\\x80-\xff\n\015()] * # normal*
- )* # )*
- \) # )
- [\040\t]* )* # If comment found, allow more spaces.
- (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- # Atom
- | # or
- " # "
- [^\\\x80-\xff\n\015"] * # normal
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
- " # "
- # Quoted string
- )
- [\040\t]* # Nab whitespace.
- (?:
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: # (
- (?: \\ [^\x80-\xff] |
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
- \) # )
- ) # special
- [^\\\x80-\xff\n\015()] * # normal*
- )* # )*
- \) # )
- [\040\t]* )* # If comment found, allow more spaces.
- # additional words
- )*
- @
- [\040\t]* # Nab whitespace.
- (?:
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: # (
- (?: \\ [^\x80-\xff] |
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
- \) # )
- ) # special
- [^\\\x80-\xff\n\015()] * # normal*
- )* # )*
- \) # )
- [\040\t]* )* # If comment found, allow more spaces.
- (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- |
- \[ # [
- (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
- \] # ]
- )
- [\040\t]* # Nab whitespace.
- (?:
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: # (
- (?: \\ [^\x80-\xff] |
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
- \) # )
- ) # special
- [^\\\x80-\xff\n\015()] * # normal*
- )* # )*
- \) # )
- [\040\t]* )* # If comment found, allow more spaces.
- # optional trailing comments
- (?:
- \.
- [\040\t]* # Nab whitespace.
- (?:
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: # (
- (?: \\ [^\x80-\xff] |
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
- \) # )
- ) # special
- [^\\\x80-\xff\n\015()] * # normal*
- )* # )*
- \) # )
- [\040\t]* )* # If comment found, allow more spaces.
- (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- |
- \[ # [
- (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
- \] # ]
- )
- [\040\t]* # Nab whitespace.
- (?:
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: # (
- (?: \\ [^\x80-\xff] |
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
- \) # )
- ) # special
- [^\\\x80-\xff\n\015()] * # normal*
- )* # )*
- \) # )
- [\040\t]* )* # If comment found, allow more spaces.
- # optional trailing comments
- )*
- # address spec
- > # >
- # name and address
- )
- /x
- Alan Other <user\@dom.ain>
- <user\@dom.ain>
- user\@dom.ain
- \"A. Other\" <user.1234\@dom.ain> (a comment)
- A. Other <user.1234\@dom.ain> (a comment)
- \"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"\@x400-re.lay
- A missing angle <user\@some.where
- *** Failers
- The quick brown fox
- /abc\0def\00pqr\000xyz\0000AB/
- abc\0def\00pqr\000xyz\0000AB
- abc456 abc\0def\00pqr\000xyz\0000ABCDE
- /abc\x0def\x00pqr\x000xyz\x0000AB/
- abc\x0def\x00pqr\x000xyz\x0000AB
- abc456 abc\x0def\x00pqr\x000xyz\x0000ABCDE
- /^[\000-\037]/
- \0A
- \01B
- \037C
- /\0*/
- \0\0\0\0
- /A\x0{2,3}Z/
- The A\x0\x0Z
- An A\0\x0\0Z
- *** Failers
- A\0Z
- A\0\x0\0\x0Z
- /^(cow|)\1(bell)/
- cowcowbell
- bell
- *** Failers
- cowbell
- /^\s/
- \040abc
- \x0cabc
- \nabc
- \rabc
- \tabc
- *** Failers
- abc
- /^a b
- c/x
- abc
- /^(a|)\1*b/
- ab
- aaaab
- b
- *** Failers
- acb
- /^(a|)\1+b/
- aab
- aaaab
- b
- *** Failers
- ab
- /^(a|)\1?b/
- ab
- aab
- b
- *** Failers
- acb
- /^(a|)\1{2}b/
- aaab
- b
- *** Failers
- ab
- aab
- aaaab
- /^(a|)\1{2,3}b/
- aaab
- aaaab
- b
- *** Failers
- ab
- aab
- aaaaab
- /ab{1,3}bc/
- abbbbc
- abbbc
- abbc
- *** Failers
- abc
- abbbbbc
- /([^.]*)\.([^:]*):[T ]+(.*)/
- track1.title:TBlah blah blah
- /([^.]*)\.([^:]*):[T ]+(.*)/i
- track1.title:TBlah blah blah
- /([^.]*)\.([^:]*):[t ]+(.*)/i
- track1.title:TBlah blah blah
- /^[W-c]+$/
- WXY_^abc
- *** Failers
- wxy
- /^[W-c]+$/i
- WXY_^abc
- wxy_^ABC
- /^[\x3f-\x5F]+$/i
- WXY_^abc
- wxy_^ABC
- /^abc$/m
- abc
- qqq\nabc
- abc\nzzz
- qqq\nabc\nzzz
- /^abc$/
- abc
- *** Failers
- qqq\nabc
- abc\nzzz
- qqq\nabc\nzzz
- /\Aabc\Z/m
- abc
- abc\n
- *** Failers
- qqq\nabc
- abc\nzzz
- qqq\nabc\nzzz
-
- /\A(.)*\Z/s
- abc\ndef
- /\A(.)*\Z/m
- *** Failers
- abc\ndef
- /(?:b)|(?::+)/
- b::c
- c::b
- /[-az]+/
- az-
- *** Failers
- b
- /[az-]+/
- za-
- *** Failers
- b
- /[a\-z]+/
- a-z
- *** Failers
- b
- /[a-z]+/
- abcdxyz
- /[\d-]+/
- 12-34
- *** Failers
- aaa
- /[\d-z]+/
- 12-34z
- *** Failers
- aaa
- /\x5c/
- \\
- /\x20Z/
- the Zoo
- *** Failers
- Zulu
- /(abc)\1/i
- abcabc
- ABCabc
- abcABC
- /ab{3cd/
- ab{3cd
- /ab{3,cd/
- ab{3,cd
- /ab{3,4a}cd/
- ab{3,4a}cd
- /{4,5a}bc/
- {4,5a}bc
- /abc$/
- abc
- abc\n
- *** Failers
- abc\ndef
- /(abc)\123/
- abc\x53
- /(abc)\223/
- abc\x93
- /(abc)\323/
- abc\xd3
- /(abc)\100/
- abc\x40
- abc\100
- /(abc)\1000/
- abc\x400
- abc\x40\x30
- abc\1000
- abc\100\x30
- abc\100\060
- abc\100\60
-
- /^A\8B\9C$/
- A8B9C
- *** Failers
- A\08B\09C
-
- /^(A)(B)(C)(D)(E)(F)(G)(H)(I)\8\9$/
- ABCDEFGHIHI
- /^[A\8B\9C]+$/
- A8B9C
- *** Failers
- A8B9C\x00
- /(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)\12\123/
- abcdefghijkllS
- /(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\12\123/
- abcdefghijk\12S
- /ab\idef/
- abidef
- /a{0}bc/
- bc
- /(a|(bc)){0,0}?xyz/
- xyz
- /abc[\10]de/
- abc\010de
- /abc[\1]de/
- abc\1de
- /(abc)[\1]de/
- abc\1de
- /(?s)a.b/
- a\nb
- /^([^a])([^\b])([^c]*)([^d]{3,4})/
- baNOTccccd
- baNOTcccd
- baNOTccd
- bacccd
- *** Failers
- anything
- b\bc
- baccd
- /[^a]/
- Abc
-
- /[^a]/i
- Abc
- /[^a]+/
- AAAaAbc
-
- /[^a]+/i
- AAAaAbc
- /[^a]+/
- bbb\nccc
-
- /[^k]$/
- abc
- *** Failers
- abk
-
- /[^k]{2,3}$/
- abc
- kbc
- kabc
- *** Failers
- abk
- akb
- akk
- /^\d{8,}\@.+[^k]$/
- 12345678\@a.b.c.d
- 123456789\@x.y.z
- *** Failers
- 12345678\@x.y.uk
- 1234567\@a.b.c.d
- /(a)\1{8,}/
- aaaaaaaaa
- aaaaaaaaaa
- *** Failers
- aaaaaaa
- /[^a]/
- aaaabcd
- aaAabcd
- /[^a]/i
- aaaabcd
- aaAabcd
- /[^az]/
- aaaabcd
- aaAabcd
- /[^az]/i
- aaaabcd
- aaAabcd
- /\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131\132\133\134\135\136\137\140\141\142\143\144\145\146\147\150\151\152\153\154\155\156\157\160\161\162\163\164\165\166\167\170\171\172\173\174\175\176\177\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377/
- \000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131\132\133\134\135\136\137\140\141\142\143\144\145\146\147\150\151\152\153\154\155\156\157\160\161\162\163\164\165\166\167\170\171\172\173\174\175\176\177\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377
- /P[^*]TAIRE[^*]{1,6}?LL/
- xxxxxxxxxxxPSTAIREISLLxxxxxxxxx
- /P[^*]TAIRE[^*]{1,}?LL/
- xxxxxxxxxxxPSTAIREISLLxxxxxxxxx
- /(\.\d\d[1-9]?)\d+/
- 1.230003938
- 1.875000282
- 1.235
-
- /(\.\d\d((?=0)|\d(?=\d)))/
- 1.230003938
- 1.875000282
- *** Failers
- 1.235
-
- /a(?)b/
- ab
-
- /\b(foo)\s+(\w+)/i
- Food is on the foo table
-
- /foo(.*)bar/
- The food is under the bar in the barn.
-
- /foo(.*?)bar/
- The food is under the bar in the barn.
- /(.*)(\d*)/
- I have 2 numbers: 53147
-
- /(.*)(\d+)/
- I have 2 numbers: 53147
-
- /(.*?)(\d*)/
- I have 2 numbers: 53147
- /(.*?)(\d+)/
- I have 2 numbers: 53147
- /(.*)(\d+)$/
- I have 2 numbers: 53147
- /(.*?)(\d+)$/
- I have 2 numbers: 53147
- /(.*)\b(\d+)$/
- I have 2 numbers: 53147
- /(.*\D)(\d+)$/
- I have 2 numbers: 53147
- /^\D*(?!123)/
- ABC123
-
- /^(\D*)(?=\d)(?!123)/
- ABC445
- *** Failers
- ABC123
-
- /^[W-]46]/
- W46]789
- -46]789
- *** Failers
- Wall
- Zebra
- 42
- [abcd]
- ]abcd[
-
- /^[W-\]46]/
- W46]789
- Wall
- Zebra
- Xylophone
- 42
- [abcd]
- ]abcd[
- \\backslash
- *** Failers
- -46]789
- well
-
- /\d\d\/\d\d\/\d\d\d\d/
- 01/01/2000
- /word (?:[a-zA-Z0-9]+ ){0,10}otherword/
- word cat dog elephant mussel cow horse canary baboon snake shark otherword
- word cat dog elephant mussel cow horse canary baboon snake shark
- /word (?:[a-zA-Z0-9]+ ){0,300}otherword/
- word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope
- /^(a){0,0}/
- bcd
- abc
- aab
- /^(a){0,1}/
- bcd
- abc
- aab
- /^(a){0,2}/
- bcd
- abc
- aab
- /^(a){0,3}/
- bcd
- abc
- aab
- aaa
- /^(a){0,}/
- bcd
- abc
- aab
- aaa
- aaaaaaaa
- /^(a){1,1}/
- bcd
- abc
- aab
- /^(a){1,2}/
- bcd
- abc
- aab
- /^(a){1,3}/
- bcd
- abc
- aab
- aaa
- /^(a){1,}/
- bcd
- abc
- aab
- aaa
- aaaaaaaa
- /.*\.gif/
- borfle\nbib.gif\nno
- /.{0,}\.gif/
- borfle\nbib.gif\nno
- /.*\.gif/m
- borfle\nbib.gif\nno
- /.*\.gif/s
- borfle\nbib.gif\nno
- /.*\.gif/ms
- borfle\nbib.gif\nno
-
- /.*$/
- borfle\nbib.gif\nno
- /.*$/m
- borfle\nbib.gif\nno
- /.*$/s
- borfle\nbib.gif\nno
- /.*$/ms
- borfle\nbib.gif\nno
-
- /.*$/
- borfle\nbib.gif\nno\n
- /.*$/m
- borfle\nbib.gif\nno\n
- /.*$/s
- borfle\nbib.gif\nno\n
- /.*$/ms
- borfle\nbib.gif\nno\n
-
- /(.*X|^B)/
- abcde\n1234Xyz
- BarFoo
- *** Failers
- abcde\nBar
- /(.*X|^B)/m
- abcde\n1234Xyz
- BarFoo
- abcde\nBar
- /(.*X|^B)/s
- abcde\n1234Xyz
- BarFoo
- *** Failers
- abcde\nBar
- /(.*X|^B)/ms
- abcde\n1234Xyz
- BarFoo
- abcde\nBar
- /(?s)(.*X|^B)/
- abcde\n1234Xyz
- BarFoo
- *** Failers
- abcde\nBar
- /(?s:.*X|^B)/
- abcde\n1234Xyz
- BarFoo
- *** Failers
- abcde\nBar
- /^.*B/
- **** Failers
- abc\nB
-
- /(?s)^.*B/
- abc\nB
- /(?m)^.*B/
- abc\nB
-
- /(?ms)^.*B/
- abc\nB
- /(?ms)^B/
- abc\nB
- /(?s)B$/
- B\n
- /^[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/
- 123456654321
-
- /^\d\d\d\d\d\d\d\d\d\d\d\d/
- 123456654321
- /^[\d][\d][\d][\d][\d][\d][\d][\d][\d][\d][\d][\d]/
- 123456654321
-
- /^[abc]{12}/
- abcabcabcabc
-
- /^[a-c]{12}/
- abcabcabcabc
-
- /^(a|b|c){12}/
- abcabcabcabc
- /^[abcdefghijklmnopqrstuvwxy0123456789]/
- n
- *** Failers
- z
- /abcde{0,0}/
- abcd
- *** Failers
- abce
- /ab[cd]{0,0}e/
- abe
- *** Failers
- abcde
-
- /ab(c){0,0}d/
- abd
- *** Failers
- abcd
- /a(b*)/
- a
- ab
- abbbb
- *** Failers
- bbbbb
-
- /ab\d{0}e/
- abe
- *** Failers
- ab1e
-
- /"([^\\"]+|\\.)*"/
- the \"quick\" brown fox
- \"the \\\"quick\\\" brown fox\"
- /.*?/g+
- abc
-
- /\b/g+
- abc
- /\b/+g
- abc
- //g
- abc
- /<tr([\w\W\s\d][^<>]{0,})><TD([\w\W\s\d][^<>]{0,})>([\d]{0,}\.)(.*)((<BR>([\w\W\s\d][^<>]{0,})|[\s]{0,}))<\/a><\/TD><TD([\w\W\s\d][^<>]{0,})>([\w\W\s\d][^<>]{0,})<\/TD><TD([\w\W\s\d][^<>]{0,})>([\w\W\s\d][^<>]{0,})<\/TD><\/TR>/is
- <TR BGCOLOR='#DBE9E9'><TD align=left valign=top>43.<a href='joblist.cfm?JobID=94 6735&Keyword='>Word Processor<BR>(N-1286)</a></TD><TD align=left valign=top>Lega lstaff.com</TD><TD align=left valign=top>CA - Statewide</TD></TR>
- /a[^a]b/
- acb
- a\nb
-
- /a.b/
- acb
- *** Failers
- a\nb
-
- /a[^a]b/s
- acb
- a\nb
-
- /a.b/s
- acb
- a\nb
- /^(b+?|a){1,2}?c/
- bac
- bbac
- bbbac
- bbbbac
- bbbbbac
- /^(b+|a){1,2}?c/
- bac
- bbac
- bbbac
- bbbbac
- bbbbbac
-
- /(?!\A)x/m
- x\nb\n
- a\bx\n
-
- /\x0{ab}/
- \0{ab}
- /(A|B)*?CD/
- CD
-
- /(A|B)*CD/
- CD
- /(AB)*?\1/
- ABABAB
- /(AB)*\1/
- ABABAB
-
- /(?<!bar)foo/
- foo
- catfood
- arfootle
- rfoosh
- *** Failers
- barfoo
- towbarfoo
- /\w{3}(?<!bar)foo/
- catfood
- *** Failers
- foo
- barfoo
- towbarfoo
- /(?<=(foo)a)bar/
- fooabar
- *** Failers
- bar
- foobbar
-
- /\Aabc\z/m
- abc
- *** Failers
- abc\n
- qqq\nabc
- abc\nzzz
- qqq\nabc\nzzz
- "(?>.*/)foo"
- /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/it/you/see/
- "(?>.*/)foo"
- /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo
- /(?>(\.\d\d[1-9]?))\d+/
- 1.230003938
- 1.875000282
- *** Failers
- 1.235
- /^((?>\w+)|(?>\s+))*$/
- now is the time for all good men to come to the aid of the party
- *** Failers
- this is not a line with only words and spaces!
-
- /(\d+)(\w)/
- 12345a
- 12345+
- /((?>\d+))(\w)/
- 12345a
- *** Failers
- 12345+
- /(?>a+)b/
- aaab
- /((?>a+)b)/
- aaab
- /(?>(a+))b/
- aaab
- /(?>b)+/
- aaabbbccc
- /(?>a+|b+|c+)*c/
- aaabbbbccccd
- /((?>[^()]+)|\([^()]*\))+/
- ((abc(ade)ufh()()x
-
- /\(((?>[^()]+)|\([^()]+\))+\)/
- (abc)
- (abc(def)xyz)
- *** Failers
- ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- /a(?-i)b/i
- ab
- Ab
- *** Failers
- aB
- AB
-
- /(a (?x)b c)d e/
- a bcd e
- *** Failers
- a b cd e
- abcd e
- a bcde
-
- /(a b(?x)c d (?-x)e f)/
- a bcde f
- *** Failers
- abcdef
- /(a(?i)b)c/
- abc
- aBc
- *** Failers
- abC
- aBC
- Abc
- ABc
- ABC
- AbC
-
- /a(?i:b)c/
- abc
- aBc
- *** Failers
- ABC
- abC
- aBC
-
- /a(?i:b)*c/
- aBc
- aBBc
- *** Failers
- aBC
- aBBC
-
- /a(?=b(?i)c)\w\wd/
- abcd
- abCd
- *** Failers
- aBCd
- abcD
-
- /(?s-i:more.*than).*million/i
- more than million
- more than MILLION
- more \n than Million
- *** Failers
- MORE THAN MILLION
- more \n than \n million
- /(?:(?s-i)more.*than).*million/i
- more than million
- more than MILLION
- more \n than Million
- *** Failers
- MORE THAN MILLION
- more \n than \n million
-
- /(?>a(?i)b+)+c/
- abc
- aBbc
- aBBc
- *** Failers
- Abc
- abAb
- abbC
-
- /(?=a(?i)b)\w\wc/
- abc
- aBc
- *** Failers
- Ab
- abC
- aBC
-
- /(?<=a(?i)b)(\w\w)c/
- abxxc
- aBxxc
- *** Failers
- Abxxc
- ABxxc
- abxxC
- /(?:(a)|b)(?(1)A|B)/
- aA
- bB
- *** Failers
- aB
- bA
- /^(a)?(?(1)a|b)+$/
- aa
- b
- bb
- *** Failers
- ab
- /^(?(?=abc)\w{3}:|\d\d)$/
- abc:
- 12
- *** Failers
- 123
- xyz
- /^(?(?!abc)\d\d|\w{3}:)$/
- abc:
- 12
- *** Failers
- 123
- xyz
-
- /(?(?<=foo)bar|cat)/
- foobar
- cat
- fcat
- focat
- *** Failers
- foocat
- /(?(?<!foo)cat|bar)/
- foobar
- cat
- fcat
- focat
- *** Failers
- foocat
- /( \( )? [^()]+ (?(1) \) |) /x
- abcd
- (abcd)
- the quick (abcd) fox
- (abcd
- /( \( )? [^()]+ (?(1) \) ) /x
- abcd
- (abcd)
- the quick (abcd) fox
- (abcd
- /^(?(2)a|(1)(2))+$/
- 12
- 12a
- 12aa
- *** Failers
- 1234
- /((?i)blah)\s+\1/
- blah blah
- BLAH BLAH
- Blah Blah
- blaH blaH
- *** Failers
- blah BLAH
- Blah blah
- blaH blah
- /((?i)blah)\s+(?i:\1)/
- blah blah
- BLAH BLAH
- Blah Blah
- blaH blaH
- blah BLAH
- Blah blah
- blaH blah
- /(?>a*)*/
- a
- aa
- aaaa
-
- /(abc|)+/
- abc
- abcabc
- abcabcabc
- xyz
- /([a]*)*/
- a
- aaaaa
-
- /([ab]*)*/
- a
- b
- ababab
- aaaabcde
- bbbb
-
- /([^a]*)*/
- b
- bbbb
- aaa
-
- /([^ab]*)*/
- cccc
- abab
-
- /([a]*?)*/
- a
- aaaa
-
- /([ab]*?)*/
- a
- b
- abab
- baba
-
- /([^a]*?)*/
- b
- bbbb
- aaa
-
- /([^ab]*?)*/
- c
- cccc
- baba
-
- /(?>a*)*/
- a
- aaabcde
-
- /((?>a*))*/
- aaaaa
- aabbaa
-
- /((?>a*?))*/
- aaaaa
- aabbaa
- /(?(?=[^a-z]+[a-z]) \d{2}-[a-z]{3}-\d{2} | \d{2}-\d{2}-\d{2} ) /x
- 12-sep-98
- 12-09-98
- *** Failers
- sep-12-98
-
- /(?<=(foo))bar\1/
- foobarfoo
- foobarfootling
- *** Failers
- foobar
- barfoo
- /(?i:saturday|sunday)/
- saturday
- sunday
- Saturday
- Sunday
- SATURDAY
- SUNDAY
- SunDay
-
- /(a(?i)bc|BB)x/
- abcx
- aBCx
- bbx
- BBx
- *** Failers
- abcX
- aBCX
- bbX
- BBX
- /^([ab](?i)[cd]|[ef])/
- ac
- aC
- bD
- elephant
- Europe
- frog
- France
- *** Failers
- Africa
- /^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)/
- ab
- aBd
- xy
- xY
- zebra
- Zambesi
- *** Failers
- aCD
- XY
- /(?<=foo\n)^bar/m
- foo\nbar
- *** Failers
- bar
- baz\nbar
- /(?<=(?<!foo)bar)baz/
- barbaz
- barbarbaz
- koobarbaz
- *** Failers
- baz
- foobarbaz
- /The cases of aaaa and aaaaaa are missed out below because Perl does things/
- /differently. We know that odd, and maybe incorrect, things happen with/
- /recursive references in Perl, as far as 5.11.3 - see some stuff in test #2./
- /^(a\1?){4}$/
- a
- aa
- aaa
- aaaaa
- aaaaaaa
- aaaaaaaa
- aaaaaaaaa
- aaaaaaaaaa
- aaaaaaaaaaa
- aaaaaaaaaaaa
- aaaaaaaaaaaaa
- aaaaaaaaaaaaaa
- aaaaaaaaaaaaaaa
- aaaaaaaaaaaaaaaa
- /^(a\1?)(a\1?)(a\2?)(a\3?)$/
- a
- aa
- aaa
- aaaa
- aaaaa
- aaaaaa
- aaaaaaa
- aaaaaaaa
- aaaaaaaaa
- aaaaaaaaaa
- aaaaaaaaaaa
- aaaaaaaaaaaa
- aaaaaaaaaaaaa
- aaaaaaaaaaaaaa
- aaaaaaaaaaaaaaa
- aaaaaaaaaaaaaaaa
- /The following tests are taken from the Perl 5.005 test suite; some of them/
- /are compatible with 5.004, but I'd rather not have to sort them out./
- /abc/
- abc
- xabcy
- ababc
- *** Failers
- xbc
- axc
- abx
- /ab*c/
- abc
- /ab*bc/
- abc
- abbc
- abbbbc
- /.{1}/
- abbbbc
- /.{3,4}/
- abbbbc
- /ab{0,}bc/
- abbbbc
- /ab+bc/
- abbc
- *** Failers
- abc
- abq
- /ab{1,}bc/
- /ab+bc/
- abbbbc
- /ab{1,}bc/
- abbbbc
- /ab{1,3}bc/
- abbbbc
- /ab{3,4}bc/
- abbbbc
- /ab{4,5}bc/
- *** Failers
- abq
- abbbbc
- /ab?bc/
- abbc
- abc
- /ab{0,1}bc/
- abc
- /ab?bc/
- /ab?c/
- abc
- /ab{0,1}c/
- abc
- /^abc$/
- abc
- *** Failers
- abbbbc
- abcc
- /^abc/
- abcc
- /^abc$/
- /abc$/
- aabc
- *** Failers
- aabc
- aabcd
- /^/
- abc
- /$/
- abc
- /a.c/
- abc
- axc
- /a.*c/
- axyzc
- /a[bc]d/
- abd
- *** Failers
- axyzd
- abc
- /a[b-d]e/
- ace
- /a[b-d]/
- aac
- /a[-b]/
- a-
- /a[b-]/
- a-
- /a]/
- a]
- /a[]]b/
- a]b
- /a[^bc]d/
- aed
- *** Failers
- abd
- abd
- /a[^-b]c/
- adc
- /a[^]b]c/
- adc
- *** Failers
- a-c
- a]c
- /\ba\b/
- a-
- -a
- -a-
- /\by\b/
- *** Failers
- xy
- yz
- xyz
- /\Ba\B/
- *** Failers
- a-
- -a
- -a-
- /\By\b/
- xy
- /\by\B/
- yz
- /\By\B/
- xyz
- /\w/
- a
- /\W/
- -
- *** Failers
- -
- a
- /a\sb/
- a b
- /a\Sb/
- a-b
- *** Failers
- a-b
- a b
- /\d/
- 1
- /\D/
- -
- *** Failers
- -
- 1
- /[\w]/
- a
- /[\W]/
- -
- *** Failers
- -
- a
- /a[\s]b/
- a b
- /a[\S]b/
- a-b
- *** Failers
- a-b
- a b
- /[\d]/
- 1
- /[\D]/
- -
- *** Failers
- -
- 1
- /ab|cd/
- abc
- abcd
- /()ef/
- def
- /$b/
- /a\(b/
- a(b
- /a\(*b/
- ab
- a((b
- /a\\b/
- a\b
- /((a))/
- abc
- /(a)b(c)/
- abc
- /a+b+c/
- aabbabc
- /a{1,}b{1,}c/
- aabbabc
- /a.+?c/
- abcabc
- /(a+|b)*/
- ab
- /(a+|b){0,}/
- ab
- /(a+|b)+/
- ab
- /(a+|b){1,}/
- ab
- /(a+|b)?/
- ab
- /(a+|b){0,1}/
- ab
- /[^ab]*/
- cde
- /abc/
- *** Failers
- b
-
- /a*/
-
- /([abc])*d/
- abbbcd
- /([abc])*bcd/
- abcd
- /a|b|c|d|e/
- e
- /(a|b|c|d|e)f/
- ef
- /abcd*efg/
- abcdefg
- /ab*/
- xabyabbbz
- xayabbbz
- /(ab|cd)e/
- abcde
- /[abhgefdc]ij/
- hij
- /^(ab|cd)e/
- /(abc|)ef/
- abcdef
- /(a|b)c*d/
- abcd
- /(ab|ab*)bc/
- abc
- /a([bc]*)c*/
- abc
- /a([bc]*)(c*d)/
- abcd
- /a([bc]+)(c*d)/
- abcd
- /a([bc]*)(c+d)/
- abcd
- /a[bcd]*dcdcde/
- adcdcde
- /a[bcd]+dcdcde/
- *** Failers
- abcde
- adcdcde
- /(ab|a)b*c/
- abc
- /((a)(b)c)(d)/
- abcd
- /[a-zA-Z_][a-zA-Z0-9_]*/
- alpha
- /^a(bc+|b[eh])g|.h$/
- abh
- /(bc+d$|ef*g.|h?i(j|k))/
- effgz
- ij
- reffgz
- *** Failers
- effg
- bcdd
- /((((((((((a))))))))))/
- a
- /((((((((((a))))))))))\10/
- aa
- /(((((((((a)))))))))/
- a
- /multiple words of text/
- *** Failers
- aa
- uh-uh
- /multiple words/
- multiple words, yeah
- /(.*)c(.*)/
- abcde
- /\((.*), (.*)\)/
- (a, b)
- /[k]/
- /abcd/
- abcd
- /a(bc)d/
- abcd
- /a[-]?c/
- ac
- /(abc)\1/
- abcabc
- /([a-c]*)\1/
- abcabc
- /(a)|\1/
- a
- *** Failers
- ab
- x
- /(([a-c])b*?\2)*/
- ababbbcbc
- /(([a-c])b*?\2){3}/
- ababbbcbc
- /((\3|b)\2(a)x)+/
- aaaxabaxbaaxbbax
- /((\3|b)\2(a)){2,}/
- bbaababbabaaaaabbaaaabba
- /abc/i
- ABC
- XABCY
- ABABC
- *** Failers
- aaxabxbaxbbx
- XBC
- AXC
- ABX
- /ab*c/i
- ABC
- /ab*bc/i
- ABC
- ABBC
- /ab*?bc/i
- ABBBBC
- /ab{0,}?bc/i
- ABBBBC
- /ab+?bc/i
- ABBC
- /ab+bc/i
- *** Failers
- ABC
- ABQ
- /ab{1,}bc/i
- /ab+bc/i
- ABBBBC
- /ab{1,}?bc/i
- ABBBBC
- /ab{1,3}?bc/i
- ABBBBC
- /ab{3,4}?bc/i
- ABBBBC
- /ab{4,5}?bc/i
- *** Failers
- ABQ
- ABBBBC
- /ab??bc/i
- ABBC
- ABC
- /ab{0,1}?bc/i
- ABC
- /ab??bc/i
- /ab??c/i
- ABC
- /ab{0,1}?c/i
- ABC
- /^abc$/i
- ABC
- *** Failers
- ABBBBC
- ABCC
- /^abc/i
- ABCC
- /^abc$/i
- /abc$/i
- AABC
- /^/i
- ABC
- /$/i
- ABC
- /a.c/i
- ABC
- AXC
- /a.*?c/i
- AXYZC
- /a.*c/i
- *** Failers
- AABC
- AXYZD
- /a[bc]d/i
- ABD
- /a[b-d]e/i
- ACE
- *** Failers
- ABC
- ABD
- /a[b-d]/i
- AAC
- /a[-b]/i
- A-
- /a[b-]/i
- A-
- /a]/i
- A]
- /a[]]b/i
- A]B
- /a[^bc]d/i
- AED
- /a[^-b]c/i
- ADC
- *** Failers
- ABD
- A-C
- /a[^]b]c/i
- ADC
- /ab|cd/i
- ABC
- ABCD
- /()ef/i
- DEF
- /$b/i
- *** Failers
- A]C
- B
- /a\(b/i
- A(B
- /a\(*b/i
- AB
- A((B
- /a\\b/i
- A\B
- /((a))/i
- ABC
- /(a)b(c)/i
- ABC
- /a+b+c/i
- AABBABC
- /a{1,}b{1,}c/i
- AABBABC
- /a.+?c/i
- ABCABC
- /a.*?c/i
- ABCABC
- /a.{0,5}?c/i
- ABCABC
- /(a+|b)*/i
- AB
- /(a+|b){0,}/i
- AB
- /(a+|b)+/i
- AB
- /(a+|b){1,}/i
- AB
- /(a+|b)?/i
- AB
- /(a+|b){0,1}/i
- AB
- /(a+|b){0,1}?/i
- AB
- /[^ab]*/i
- CDE
- /abc/i
- /a*/i
-
- /([abc])*d/i
- ABBBCD
- /([abc])*bcd/i
- ABCD
- /a|b|c|d|e/i
- E
- /(a|b|c|d|e)f/i
- EF
- /abcd*efg/i
- ABCDEFG
- /ab*/i
- XABYABBBZ
- XAYABBBZ
- /(ab|cd)e/i
- ABCDE
- /[abhgefdc]ij/i
- HIJ
- /^(ab|cd)e/i
- ABCDE
- /(abc|)ef/i
- ABCDEF
- /(a|b)c*d/i
- ABCD
- /(ab|ab*)bc/i
- ABC
- /a([bc]*)c*/i
- ABC
- /a([bc]*)(c*d)/i
- ABCD
- /a([bc]+)(c*d)/i
- ABCD
- /a([bc]*)(c+d)/i
- ABCD
- /a[bcd]*dcdcde/i
- ADCDCDE
- /a[bcd]+dcdcde/i
- /(ab|a)b*c/i
- ABC
- /((a)(b)c)(d)/i
- ABCD
- /[a-zA-Z_][a-zA-Z0-9_]*/i
- ALPHA
- /^a(bc+|b[eh])g|.h$/i
- ABH
- /(bc+d$|ef*g.|h?i(j|k))/i
- EFFGZ
- IJ
- REFFGZ
- *** Failers
- ADCDCDE
- EFFG
- BCDD
- /((((((((((a))))))))))/i
- A
- /((((((((((a))))))))))\10/i
- AA
- /(((((((((a)))))))))/i
- A
- /(?:(?:(?:(?:(?:(?:(?:(?:(?:(a))))))))))/i
- A
- /(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))/i
- C
- /multiple words of text/i
- *** Failers
- AA
- UH-UH
- /multiple words/i
- MULTIPLE WORDS, YEAH
- /(.*)c(.*)/i
- ABCDE
- /\((.*), (.*)\)/i
- (A, B)
- /[k]/i
- /abcd/i
- ABCD
- /a(bc)d/i
- ABCD
- /a[-]?c/i
- AC
- /(abc)\1/i
- ABCABC
- /([a-c]*)\1/i
- ABCABC
- /a(?!b)./
- abad
- /a(?=d)./
- abad
- /a(?=c|d)./
- abad
- /a(?:b|c|d)(.)/
- ace
- /a(?:b|c|d)*(.)/
- ace
- /a(?:b|c|d)+?(.)/
- ace
- acdbcdbe
- /a(?:b|c|d)+(.)/
- acdbcdbe
- /a(?:b|c|d){2}(.)/
- acdbcdbe
- /a(?:b|c|d){4,5}(.)/
- acdbcdbe
- /a(?:b|c|d){4,5}?(.)/
- acdbcdbe
- /((foo)|(bar))*/
- foobar
- /a(?:b|c|d){6,7}(.)/
- acdbcdbe
- /a(?:b|c|d){6,7}?(.)/
- acdbcdbe
- /a(?:b|c|d){5,6}(.)/
- acdbcdbe
- /a(?:b|c|d){5,6}?(.)/
- acdbcdbe
- /a(?:b|c|d){5,7}(.)/
- acdbcdbe
- /a(?:b|c|d){5,7}?(.)/
- acdbcdbe
- /a(?:b|(c|e){1,2}?|d)+?(.)/
- ace
- /^(.+)?B/
- AB
- /^([^a-z])|(\^)$/
- .
- /^[<>]&/
- <&OUT
- /^(a\1?){4}$/
- aaaaaaaaaa
- *** Failers
- AB
- aaaaaaaaa
- aaaaaaaaaaa
- /^(a(?(1)\1)){4}$/
- aaaaaaaaaa
- *** Failers
- aaaaaaaaa
- aaaaaaaaaaa
- /(?:(f)(o)(o)|(b)(a)(r))*/
- foobar
- /(?<=a)b/
- ab
- *** Failers
- cb
- b
- /(?<!c)b/
- ab
- b
- b
- /(?:..)*a/
- aba
- /(?:..)*?a/
- aba
- /^(?:b|a(?=(.)))*\1/
- abc
- /^(){3,5}/
- abc
- /^(a+)*ax/
- aax
- /^((a|b)+)*ax/
- aax
- /^((a|bc)+)*ax/
- aax
- /(a|x)*ab/
- cab
- /(a)*ab/
- cab
- /(?:(?i)a)b/
- ab
- /((?i)a)b/
- ab
- /(?:(?i)a)b/
- Ab
- /((?i)a)b/
- Ab
- /(?:(?i)a)b/
- *** Failers
- cb
- aB
- /((?i)a)b/
- /(?i:a)b/
- ab
- /((?i:a))b/
- ab
- /(?i:a)b/
- Ab
- /((?i:a))b/
- Ab
- /(?i:a)b/
- *** Failers
- aB
- aB
- /((?i:a))b/
- /(?:(?-i)a)b/i
- ab
- /((?-i)a)b/i
- ab
- /(?:(?-i)a)b/i
- aB
- /((?-i)a)b/i
- aB
- /(?:(?-i)a)b/i
- *** Failers
- aB
- Ab
- /((?-i)a)b/i
- /(?:(?-i)a)b/i
- aB
- /((?-i)a)b/i
- aB
- /(?:(?-i)a)b/i
- *** Failers
- Ab
- AB
- /((?-i)a)b/i
- /(?-i:a)b/i
- ab
- /((?-i:a))b/i
- ab
- /(?-i:a)b/i
- aB
- /((?-i:a))b/i
- aB
- /(?-i:a)b/i
- *** Failers
- AB
- Ab
- /((?-i:a))b/i
- /(?-i:a)b/i
- aB
- /((?-i:a))b/i
- aB
- /(?-i:a)b/i
- *** Failers
- Ab
- AB
- /((?-i:a))b/i
- /((?-i:a.))b/i
- *** Failers
- AB
- a\nB
- /((?s-i:a.))b/i
- a\nB
- /(?:c|d)(?:)(?:a(?:)(?:b)(?:b(?:))(?:b(?:)(?:b)))/
- cabbbb
- /(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))/
- caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
- /(ab)\d\1/i
- Ab4ab
- ab4Ab
- /foo\w*\d{4}baz/
- foobar1234baz
- /x(~~)*(?:(?:F)?)?/
- x~~
- /^a(?#xxx){3}c/
- aaac
- /^a (?#xxx) (?#yyy) {3}c/x
- aaac
- /(?<![cd])b/
- *** Failers
- B\nB
- dbcb
- /(?<![cd])[ab]/
- dbaacb
- /(?<!(c|d))b/
- /(?<!(c|d))[ab]/
- dbaacb
- /(?<!cd)[ab]/
- cdaccb
- /^(?:a?b?)*$/
- \
- a
- ab
- aaa
- *** Failers
- dbcb
- a--
- aa--
- /((?s)^a(.))((?m)^b$)/
- a\nb\nc\n
- /((?m)^b$)/
- a\nb\nc\n
- /(?m)^b/
- a\nb\n
- /(?m)^(b)/
- a\nb\n
- /((?m)^b)/
- a\nb\n
- /\n((?m)^b)/
- a\nb\n
- /((?s).)c(?!.)/
- a\nb\nc\n
- a\nb\nc\n
- /((?s)b.)c(?!.)/
- a\nb\nc\n
- a\nb\nc\n
- /^b/
- /()^b/
- *** Failers
- a\nb\nc\n
- a\nb\nc\n
- /((?m)^b)/
- a\nb\nc\n
- /(x)?(?(1)a|b)/
- *** Failers
- a
- a
- /(x)?(?(1)b|a)/
- a
- /()?(?(1)b|a)/
- a
- /()(?(1)b|a)/
- /()?(?(1)a|b)/
- a
- /^(\()?blah(?(1)(\)))$/
- (blah)
- blah
- *** Failers
- a
- blah)
- (blah
- /^(\(+)?blah(?(1)(\)))$/
- (blah)
- blah
- *** Failers
- blah)
- (blah
- /(?(?!a)a|b)/
- /(?(?!a)b|a)/
- a
- /(?(?=a)b|a)/
- *** Failers
- a
- a
- /(?(?=a)a|b)/
- a
- /(?=(a+?))(\1ab)/
- aaab
- /^(?=(a+?))\1ab/
- /(\w+:)+/
- one:
- /$(?<=^(a))/
- a
- /(?=(a+?))(\1ab)/
- aaab
- /^(?=(a+?))\1ab/
- *** Failers
- aaab
- aaab
- /([\w:]+::)?(\w+)$/
- abcd
- xy:z:::abcd
- /^[^bcd]*(c+)/
- aexycd
- /(a*)b+/
- caab
- /([\w:]+::)?(\w+)$/
- abcd
- xy:z:::abcd
- *** Failers
- abcd:
- abcd:
- /^[^bcd]*(c+)/
- aexycd
- /(>a+)ab/
- /(?>a+)b/
- aaab
- /([[:]+)/
- a:[b]:
- /([[=]+)/
- a=[b]=
- /([[.]+)/
- a.[b].
- /((?>a+)b)/
- aaab
- /(?>(a+))b/
- aaab
- /((?>[^()]+)|\([^()]*\))+/
- ((abc(ade)ufh()()x
- /a\Z/
- *** Failers
- aaab
- a\nb\n
- /b\Z/
- a\nb\n
- /b\z/
- /b\Z/
- a\nb
- /b\z/
- a\nb
- *** Failers
-
- /^(?>(?(1)\.|())[^\W_](?>[a-z0-9-]*[^\W_])?)+$/
- a
- abc
- a-b
- 0-9
- a.b
- 5.6.7
- the.quick.brown.fox
- a100.b200.300c
- 12-ab.1245
- *** Failers
- \
- .a
- -a
- a-
- a.
- a_b
- a.-
- a..
- ab..bc
- the.quick.brown.fox-
- the.quick.brown.fox.
- the.quick.brown.fox_
- the.quick.brown.fox+
- /(?>.*)(?<=(abcd|wxyz))/
- alphabetabcd
- endingwxyz
- *** Failers
- a rather long string that doesn't end with one of them
- /word (?>(?:(?!otherword)[a-zA-Z0-9]+ ){0,30})otherword/
- word cat dog elephant mussel cow horse canary baboon snake shark otherword
- word cat dog elephant mussel cow horse canary baboon snake shark
-
- /word (?>[a-zA-Z0-9]+ ){0,30}otherword/
- word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope
- /(?<=\d{3}(?!999))foo/
- 999foo
- 123999foo
- *** Failers
- 123abcfoo
-
- /(?<=(?!...999)\d{3})foo/
- 999foo
- 123999foo
- *** Failers
- 123abcfoo
- /(?<=\d{3}(?!999)...)foo/
- 123abcfoo
- 123456foo
- *** Failers
- 123999foo
-
- /(?<=\d{3}...)(?<!999)foo/
- 123abcfoo
- 123456foo
- *** Failers
- 123999foo
- /<a[\s]+href[\s]*=[\s]* # find <a href=
- ([\"\'])? # find single or double quote
- (?(1) (.*?)\1 | ([^\s]+)) # if quote found, match up to next matching
- # quote, otherwise match up to next space
- /isx
- <a href=abcd xyz
- <a href=\"abcd xyz pqr\" cats
- <a href=\'abcd xyz pqr\' cats
- /<a\s+href\s*=\s* # find <a href=
- (["'])? # find single or double quote
- (?(1) (.*?)\1 | (\S+)) # if quote found, match up to next matching
- # quote, otherwise match up to next space
- /isx
- <a href=abcd xyz
- <a href=\"abcd xyz pqr\" cats
- <a href = \'abcd xyz pqr\' cats
- /<a\s+href(?>\s*)=(?>\s*) # find <a href=
- (["'])? # find single or double quote
- (?(1) (.*?)\1 | (\S+)) # if quote found, match up to next matching
- # quote, otherwise match up to next space
- /isx
- <a href=abcd xyz
- <a href=\"abcd xyz pqr\" cats
- <a href = \'abcd xyz pqr\' cats
- /((Z)+|A)*/
- ZABCDEFG
- /(Z()|A)*/
- ZABCDEFG
- /(Z(())|A)*/
- ZABCDEFG
- /((?>Z)+|A)*/
- ZABCDEFG
- /((?>)+|A)*/
- ZABCDEFG
- /a*/g
- abbab
- /^[\d-a]/
- abcde
- -things
- 0digit
- *** Failers
- bcdef
-
- /[[:space:]]+/
- > \x09\x0a\x0c\x0d\x0b<
-
- /[[:blank:]]+/
- > \x09\x0a\x0c\x0d\x0b<
-
- /[\s]+/
- > \x09\x0a\x0c\x0d\x0b<
-
- /\s+/
- > \x09\x0a\x0c\x0d\x0b<
-
- /ab/x
- ab
- /(?!\A)x/m
- a\nxb\n
- /(?!^)x/m
- a\nxb\n
- /abc\Qabc\Eabc/
- abcabcabc
-
- /abc\Q(*+|\Eabc/
- abc(*+|abc
- / abc\Q abc\Eabc/x
- abc abcabc
- *** Failers
- abcabcabc
-
- /abc#comment
- \Q#not comment
- literal\E/x
- abc#not comment\n literal
- /abc#comment
- \Q#not comment
- literal/x
- abc#not comment\n literal
- /abc#comment
- \Q#not comment
- literal\E #more comment
- /x
- abc#not comment\n literal
- /abc#comment
- \Q#not comment
- literal\E #more comment/x
- abc#not comment\n literal
- /\Qabc\$xyz\E/
- abc\\\$xyz
- /\Qabc\E\$\Qxyz\E/
- abc\$xyz
- /\Gabc/
- abc
- *** Failers
- xyzabc
- /\Gabc./g
- abc1abc2xyzabc3
- /abc./g
- abc1abc2xyzabc3
- /a(?x: b c )d/
- XabcdY
- *** Failers
- Xa b c d Y
- /((?x)x y z | a b c)/
- XabcY
- AxyzB
- /(?i)AB(?-i)C/
- XabCY
- *** Failers
- XabcY
- /((?i)AB(?-i)C|D)E/
- abCE
- DE
- *** Failers
- abcE
- abCe
- dE
- De
- /(.*)\d+\1/
- abc123abc
- abc123bc
- /(.*)\d+\1/s
- abc123abc
- abc123bc
-
- /((.*))\d+\1/
- abc123abc
- abc123bc
- /-- This tests for an IPv6 address in the form where it can have up to
- eight components, one and only one of which is empty. This must be
- an internal component. --/
- /^(?!:) # colon disallowed at start
- (?: # start of item
- (?: [0-9a-f]{1,4} | # 1-4 hex digits or
- (?(1)0 | () ) ) # if null previously matched, fail; else null
- : # followed by colon
- ){1,7} # end item; 1-7 of them required
- [0-9a-f]{1,4} $ # final hex number at end of string
- (?(1)|.) # check that there was an empty component
- /xi
- a123::a123
- a123:b342::abcd
- a123:b342::324e:abcd
- a123:ddde:b342::324e:abcd
- a123:ddde:b342::324e:dcba:abcd
- a123:ddde:9999:b342::324e:dcba:abcd
- *** Failers
- 1:2:3:4:5:6:7:8
- a123:bce:ddde:9999:b342::324e:dcba:abcd
- a123::9999:b342::324e:dcba:abcd
- abcde:2:3:4:5:6:7:8
- ::1
- abcd:fee0:123::
- :1
- 1:
- /[z\Qa-d]\E]/
- z
- a
- -
- d
- ]
- *** Failers
- b
- /[\z\C]/
- z
- C
-
- /\M/
- M
-
- /(a+)*b/
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-
- /(?i)reg(?:ul(?:[aä]|ae)r|ex)/
- REGular
- regulaer
- Regex
- regulär
- /Åæåä[à-ÿÀ-ß]+/
- Åæåäà
- Åæåäÿ
- ÅæåäÀ
- Åæåäß
- /(?<=Z)X./
- \x84XAZXB
- /ab cd (?x) de fg/
- ab cd defg
- /ab cd(?x) de fg/
- ab cddefg
- ** Failers
- abcddefg
- /(?<![^f]oo)(bar)/
- foobarX
- ** Failers
- boobarX
- /(?<![^f])X/
- offX
- ** Failers
- onyX
- /(?<=[^f])X/
- onyX
- ** Failers
- offX
- /^/mg
- a\nb\nc\n
- \
-
- /(?<=C\n)^/mg
- A\nC\nC\n
- /(?:(?(1)a|b)(X))+/
- bXaX
- /(?:(?(1)\1a|b)(X|Y))+/
- bXXaYYaY
- bXYaXXaX
- /()()()()()()()()()(?:(?(10)\10a|b)(X|Y))+/
- bXXaYYaY
- /[[,abc,]+]/
- abc]
- a,b]
- [a,b,c]
- /(?-x: )/x
- A\x20B
-
- "(?x)(?-x: \s*#\s*)"
- A # B
- ** Failers
- #
- "(?x-is)(?:(?-ixs) \s*#\s*) include"
- A #include
- ** Failers
- A#include
- A #Include
- /a*b*\w/
- aaabbbb
- aaaa
- a
- /a*b?\w/
- aaabbbb
- aaaa
- a
- /a*b{0,4}\w/
- aaabbbb
- aaaa
- a
- /a*b{0,}\w/
- aaabbbb
- aaaa
- a
-
- /a*\d*\w/
- 0a
- a
-
- /a*b *\w/x
- a
- /a*b#comment
- *\w/x
- a
- /a* b *\w/x
- a
- /^\w+=.*(\\\n.*)*/
- abc=xyz\\\npqr
- /(?=(\w+))\1:/
- abcd:
- /^(?=(\w+))\1:/
- abcd:
- /^\Eabc/
- abc
-
- /^[\Eabc]/
- a
- ** Failers
- E
-
- /^[a-\Ec]/
- b
- ** Failers
- -
- E
- /^[a\E\E-\Ec]/
- b
- ** Failers
- -
- E
- /^[\E\Qa\E-\Qz\E]+/
- b
- ** Failers
- -
-
- /^[a\Q]bc\E]/
- a
- ]
- c
-
- /^[a-\Q\E]/
- a
- -
- /^(a()*)*/
- aaaa
- /^(?:a(?:(?:))*)*/
- aaaa
- /^(a()+)+/
- aaaa
- /^(?:a(?:(?:))+)+/
- aaaa
- /(a){0,3}(?(1)b|(c|))*D/
- abbD
- ccccD
- D
- /(a|)*\d/
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
- /(?>a|)*\d/
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
- /(?:a|)*\d/
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
- /\Z/g
- abc\n
-
- /^(?s)(?>.*)(?<!\n)/
- abc
- abc\n
- /^(?![^\n]*\n\z)/
- abc
- abc\n
-
- /\z(?<!\n)/
- abc
- abc\n
- /(.*(.)?)*/
- abcd
- /( (A | (?(1)0|) )* )/x
- abcd
- /( ( (?(1)0|) )* )/x
- abcd
- /( (?(1)0|)* )/x
- abcd
- /[[:abcd:xyz]]/
- a]
- :]
-
- /[abc[:x\]pqr]/
- a
- [
- :
- ]
- p
- /.*[op][xyz]/
- fooabcfoo
- /(?(?=.*b)b|^)/
- adc
- abc
- /(?(?=^.*b)b|^)/
- adc
- abc
- /(?(?=.*b)b|^)*/
- adc
- abc
- /(?(?=.*b)b|^)+/
- adc
- abc
- /(?(?=b).*b|^d)/
- abc
- /(?(?=.*b).*b|^d)/
- abc
- /^%((?(?=[a])[^%])|b)*%$/
- %ab%
- /(?i)a(?-i)b|c/
- XabX
- XAbX
- CcC
- ** Failers
- XABX
- /[\x00-\xff\s]+/
- \x0a\x0b\x0c\x0d
- /^\c/
- ?
- /(abc)\1/i
- abc
- /(abc)\1/
- abc
- /[^a]*/i
- 12abc
- 12ABC
- /[^a]*+/i
- 12abc
- 12ABC
- /[^a]*?X/i
- ** Failers
- 12abc
- 12ABC
-
- /[^a]+?X/i
- ** Failers
- 12abc
- 12ABC
- /[^a]?X/i
- 12aXbcX
- 12AXBCX
- BCX
- /[^a]??X/i
- 12aXbcX
- 12AXBCX
- BCX
-
- /[^a]?+X/i
- 12aXbcX
- 12AXBCX
- BCX
- /[^a]{2,3}/i
- abcdef
- ABCDEF
- /[^a]{2,3}?/i
- abcdef
- ABCDEF
- /[^a]{2,3}+/i
- abcdef
- ABCDEF
- /((a|)+)+Z/
- Z
- /(a)b|(a)c/
- ac
- /(?>(a))b|(a)c/
- ac
- /(?=(a))ab|(a)c/
- ac
- /((?>(a))b|(a)c)/
- ac
- /((?>(a))b|(a)c)++/
- ac
- /(?:(?>(a))b|(a)c)++/
- ac
- /(?=(?>(a))b|(a)c)(..)/
- ac
- /(?>(?>(a))b|(a)c)/
- ac
- /(?:(?>([ab])))+a=/+
- =ba=
- /(?>([ab]))+a=/+
- =ba=
- /((?>(a+)b)+(aabab))/
- aaaabaaabaabab
- /(?>a+|ab)+?c/
- aabc
- /(?>a+|ab)+c/
- aabc
- /(?:a+|ab)+c/
- aabc
- /(?(?=(a))a)/
- a
- /(?(?=(a))a)(b)/
- ab
- /^(?:a|ab)++c/
- aaaabc
- /^(?>a|ab)++c/
- aaaabc
- /^(?:a|ab)+c/
- aaaabc
- /(?=abc){3}abc/+
- abcabcabc
- ** Failers
- xyz
-
- /(?=abc)+abc/+
- abcabcabc
- ** Failers
- xyz
-
- /(?=abc)++abc/+
- abcabcabc
- ** Failers
- xyz
-
- /(?=abc){0}xyz/
- xyz
- /(?=abc){1}xyz/
- ** Failers
- xyz
-
- /(?=(a))?./
- ab
- bc
-
- /(?=(a))??./
- ab
- bc
- /^(?=(?1))?[az]([abc])d/
- abd
- zcdxx
- /^(?!a){0}\w+/
- aaaaa
- /(?<=(abc))?xyz/
- abcxyz
- pqrxyz
- /^[\g<a>]+/
- ggg<<<aaa>>>
- ** Failers
- \\ga
-
- /^[\ga]+/
- gggagagaxyz
-
- /^[:a[:digit:]]+/
- aaaa444:::Z
- /^[:a[:digit:]:b]+/
- aaaa444:::bbbZ
- /[:a]xxx[b:]/
- :xxx:
-
- /(?<=a{2})b/i
- xaabc
- ** Failers
- xabc
- /(?<!a{2})b/i
- xabc
- ** Failers
- xaabc
- /(?<=a\h)c/
- xa c
-
- /(?<=[^a]{2})b/
- axxbc
- aAAbc
- ** Failers
- xaabc
- /(?<=[^a]{2})b/i
- axxbc
- ** Failers
- aAAbc
- xaabc
- /(?<=a\H)c/
- abc
- /(?<=a\V)c/
- abc
-
- /(?<=a\v)c/
- a\nc
- /(?(?=c)c|d)++Y/
- XcccddYX
- /(?(?=c)c|d)*+Y/
- XcccddYX
- /^(a{2,3}){2,}+a/
- aaaaaaa
- ** Failers
- aaaaaa
- aaaaaaaaa
- /^(a{2,3})++a/
- ** Failers
- aaaaaa
- /^(a{2,3})*+a/
- ** Failers
- aaaaaa
- /ab\Cde/
- abXde
-
- /(?<=ab\Cde)X/
- abZdeX
- /a[\CD]b/
- aCb
- aDb
- /a[\C-X]b/
- aJb
- /\H\h\V\v/
- X X\x0a
- X\x09X\x0b
- ** Failers
- \xa0 X\x0a
-
- /\H*\h+\V?\v{3,4}/
- \x09\x20\xa0X\x0a\x0b\x0c\x0d\x0a
- \x09\x20\xa0\x0a\x0b\x0c\x0d\x0a
- \x09\x20\xa0\x0a\x0b\x0c
- ** Failers
- \x09\x20\xa0\x0a\x0b
-
- /\H{3,4}/
- XY ABCDE
- XY PQR ST
-
- /.\h{3,4}./
- XY AB PQRS
- /\h*X\h?\H+Y\H?Z/
- >XNNNYZ
- > X NYQZ
- ** Failers
- >XYZ
- > X NY Z
- /\v*X\v?Y\v+Z\V*\x0a\V+\x0b\V{2,3}\x0c/
- >XY\x0aZ\x0aA\x0bNN\x0c
- >\x0a\x0dX\x0aY\x0a\x0bZZZ\x0aAAA\x0bNNN\x0c
- /(foo)\Kbar/
- foobar
-
- /(foo)(\Kbar|baz)/
- foobar
- foobaz
- /(foo\Kbar)baz/
- foobarbaz
- /abc\K|def\K/g+
- Xabcdefghi
- /ab\Kc|de\Kf/g+
- Xabcdefghi
-
- /(?=C)/g+
- ABCDECBA
-
- /^abc\K/+
- abcdef
- ** Failers
- defabcxyz
- /^(a(b))\1\g1\g{1}\g-1\g{-1}\g{-02}Z/
- ababababbbabZXXXX
- /(?<A>tom|bon)-\g{A}/
- tom-tom
- bon-bon
-
- /(^(a|b\g{-1}))/
- bacxxx
- /(?|(abc)|(xyz))\1/
- abcabc
- xyzxyz
- ** Failers
- abcxyz
- xyzabc
-
- /(?|(abc)|(xyz))(?1)/
- abcabc
- xyzabc
- ** Failers
- xyzxyz
-
- /^X(?5)(a)(?|(b)|(q))(c)(d)(Y)/
- XYabcdY
- /^X(?7)(a)(?|(b|(r)(s))|(q))(c)(d)(Y)/
- XYabcdY
- /^X(?7)(a)(?|(b|(?|(r)|(t))(s))|(q))(c)(d)(Y)/
- XYabcdY
- /(?'abc'\w+):\k<abc>{2}/
- a:aaxyz
- ab:ababxyz
- ** Failers
- a:axyz
- ab:abxyz
- /(?'abc'\w+):\g{abc}{2}/
- a:aaxyz
- ab:ababxyz
- ** Failers
- a:axyz
- ab:abxyz
- /^(?<ab>a)? (?(<ab>)b|c) (?('ab')d|e)/x
- abd
- ce
- /^(a.)\g-1Z/
- aXaXZ
- /^(a.)\g{-1}Z/
- aXaXZ
- /^(?(DEFINE) (?<A> a) (?<B> b) ) (?&A) (?&B) /x
- abcd
- /(?<NAME>(?&NAME_PAT))\s+(?<ADDR>(?&ADDRESS_PAT))
- (?(DEFINE)
- (?<NAME_PAT>[a-z]+)
- (?<ADDRESS_PAT>\d+)
- )/x
- metcalfe 33
- /(?(DEFINE)(?<byte>2[0-4]\d|25[0-5]|1\d\d|[1-9]?\d))\b(?&byte)(\.(?&byte)){3}/
- 1.2.3.4
- 131.111.10.206
- 10.0.0.0
- ** Failers
- 10.6
- 455.3.4.5
- /\b(?&byte)(\.(?&byte)){3}(?(DEFINE)(?<byte>2[0-4]\d|25[0-5]|1\d\d|[1-9]?\d))/
- 1.2.3.4
- 131.111.10.206
- 10.0.0.0
- ** Failers
- 10.6
- 455.3.4.5
- /^(\w++|\s++)*$/
- now is the time for all good men to come to the aid of the party
- *** Failers
- this is not a line with only words and spaces!
- /(\d++)(\w)/
- 12345a
- *** Failers
- 12345+
- /a++b/
- aaab
- /(a++b)/
- aaab
- /(a++)b/
- aaab
- /([^()]++|\([^()]*\))+/
- ((abc(ade)ufh()()x
- /\(([^()]++|\([^()]+\))+\)/
- (abc)
- (abc(def)xyz)
- *** Failers
- ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- /^([^()]|\((?1)*\))*$/
- abc
- a(b)c
- a(b(c))d
- *** Failers)
- a(b(c)d
- /^>abc>([^()]|\((?1)*\))*<xyz<$/
- >abc>123<xyz<
- >abc>1(2)3<xyz<
- >abc>(1(2)3)<xyz<
- /^(?:((.)(?1)\2|)|((.)(?3)\4|.))$/i
- 1221
- Satanoscillatemymetallicsonatas
- AmanaplanacanalPanama
- AblewasIereIsawElba
- *** Failers
- Thequickbrownfox
- /^(\d+|\((?1)([+*-])(?1)\)|-(?1))$/
- 12
- (((2+2)*-3)-7)
- -12
- *** Failers
- ((2+2)*-3)-7)
- /^(x(y|(?1){2})z)/
- xyz
- xxyzxyzz
- *** Failers
- xxyzz
- xxyzxyzxyzz
- /((< (?: (?(R) \d++ | [^<>]*+) | (?2)) * >))/x
- <>
- <abcd>
- <abc <123> hij>
- <abc <def> hij>
- <abc<>def>
- <abc<>
- *** Failers
- <abc
- /^a+(*FAIL)/
- aaaaaa
-
- /a+b?c+(*FAIL)/
- aaabccc
- /a+b?(*PRUNE)c+(*FAIL)/
- aaabccc
- /a+b?(*COMMIT)c+(*FAIL)/
- aaabccc
-
- /a+b?(*SKIP)c+(*FAIL)/
- aaabcccaaabccc
- /^(?:aaa(*THEN)\w{6}|bbb(*THEN)\w{5}|ccc(*THEN)\w{4}|\w{3})/
- aaaxxxxxx
- aaa++++++
- bbbxxxxx
- bbb+++++
- cccxxxx
- ccc++++
- dddddddd
- /^(aaa(*THEN)\w{6}|bbb(*THEN)\w{5}|ccc(*THEN)\w{4}|\w{3})/
- aaaxxxxxx
- aaa++++++
- bbbxxxxx
- bbb+++++
- cccxxxx
- ccc++++
- dddddddd
- /a+b?(*THEN)c+(*FAIL)/
- aaabccc
- /(A (A|B(*ACCEPT)|C) D)(E)/x
- AB
- ABX
- AADE
- ACDE
- ** Failers
- AD
-
- /^\W*+(?:((.)\W*+(?1)\W*+\2|)|((.)\W*+(?3)\W*+\4|\W*+.\W*+))\W*+$/i
- 1221
- Satan, oscillate my metallic sonatas!
- A man, a plan, a canal: Panama!
- Able was I ere I saw Elba.
- *** Failers
- The quick brown fox
- /^((.)(?1)\2|.)$/
- a
- aba
- aabaa
- abcdcba
- pqaabaaqp
- ablewasiereisawelba
- rhubarb
- the quick brown fox
- /(a)(?<=b(?1))/
- baz
- ** Failers
- caz
-
- /(?<=b(?1))(a)/
- zbaaz
- ** Failers
- aaa
-
- /(?<X>a)(?<=b(?&X))/
- baz
- /^(?|(abc)|(def))\1/
- abcabc
- defdef
- ** Failers
- abcdef
- defabc
-
- /^(?|(abc)|(def))(?1)/
- abcabc
- defabc
- ** Failers
- defdef
- abcdef
- /(?:a(?<quote> (?<apostrophe>')|(?<realquote>")) |b(?<quote> (?<apostrophe>')|(?<realquote>")) ) (?('quote')[a-z]+|[0-9]+)/xJ
- a\"aaaaa
- b\"aaaaa
- ** Failers
- b\"11111
- /(?:(?1)|B)(A(*F)|C)/
- ABCD
- CCD
- ** Failers
- CAD
- /^(?:(?1)|B)(A(*F)|C)/
- CCD
- BCD
- ** Failers
- ABCD
- CAD
- BAD
- /(?:(?1)|B)(A(*ACCEPT)XX|C)D/
- AAD
- ACD
- BAD
- BCD
- BAX
- ** Failers
- ACX
- ABC
- /(?(DEFINE)(A))B(?1)C/
- BAC
- /(?(DEFINE)((A)\2))B(?1)C/
- BAAC
- /(?<pn> \( ( [^()]++ | (?&pn) )* \) )/x
- (ab(cd)ef)
- /^(?=a(*SKIP)b|ac)/
- ** Failers
- ac
-
- /^(?=a(*PRUNE)b)/
- ab
- ** Failers
- ac
- /^(?=a(*ACCEPT)b)/
- ac
- /(?>a\Kb)/
- ab
- /((?>a\Kb))/
- ab
- /(a\Kb)/
- ab
-
- /^a\Kcz|ac/
- ac
-
- /(?>a\Kbz|ab)/
- ab
- /^(?&t)(?(DEFINE)(?<t>a\Kb))$/
- ab
- /^([^()]|\((?1)*\))*$/
- a(b)c
- a(b(c)d)e
- /(?P<L1>(?P<L2>0)(?P>L1)|(?P>L2))/
- 0
- 00
- 0000
- /(?P<L1>(?P<L2>0)|(?P>L2)(?P>L1))/
- 0
- 00
- 0000
- /--- This one does fail, as expected, in Perl. It needs the complex item at the
- end of the pattern. A single letter instead of (B|D) makes it not fail,
- which I think is a Perl bug. --- /
- /A(*COMMIT)(B|D)/
- ACABX
- /--- Check the use of names for failure ---/
- /^(A(*PRUNE:A)B|C(*PRUNE:B)D)/K
- ** Failers
- AC
- CB
-
- /--- Force no study, otherwise mark is not seen. The studied version is in
- test 2 because it isn't Perl-compatible. ---/
- /(*MARK:A)(*SKIP:B)(C|X)/KSS
- C
- D
-
- /^(A(*THEN:A)B|C(*THEN:B)D)/K
- ** Failers
- CB
- /^(?:A(*THEN:A)B|C(*THEN:B)D)/K
- CB
-
- /^(?>A(*THEN:A)B|C(*THEN:B)D)/K
- CB
-
- /--- This should succeed, as the skip causes bump to offset 1 (the mark). Note
- that we have to have something complicated such as (B|Z) at the end because,
- for Perl, a simple character somehow causes an unwanted optimization to mess
- with the handling of backtracking verbs. ---/
- /A(*MARK:A)A+(*SKIP:A)(B|Z) | AC/xK
- AAAC
-
- /--- Test skipping over a non-matching mark. ---/
- /A(*MARK:A)A+(*MARK:B)(*SKIP:A)(B|Z) | AC/xK
- AAAC
-
- /--- Check shorthand for MARK ---/
- /A(*:A)A+(*SKIP:A)(B|Z) | AC/xK
- AAAC
- /--- Don't loop! Force no study, otherwise mark is not seen. ---/
- /(*:A)A+(*SKIP:A)(B|Z)/KSS
- AAAC
- /--- This should succeed, as a non-existent skip name disables the skip ---/
- /A(*MARK:A)A+(*SKIP:B)(B|Z) | AC/xK
- AAAC
- /A(*MARK:A)A+(*SKIP:B)(B|Z) | AC(*:B)/xK
- AAAC
- /--- COMMIT at the start of a pattern should act like an anchor. Again,
- however, we need the complication for Perl. ---/
- /(*COMMIT)(A|P)(B|P)(C|P)/
- ABCDEFG
- ** Failers
- DEFGABC
- /--- COMMIT inside an atomic group can't stop backtracking over the group. ---/
- /(\w+)(?>b(*COMMIT))\w{2}/
- abbb
- /(\w+)b(*COMMIT)\w{2}/
- abbb
- /--- Check opening parens in comment when seeking forward reference. ---/
- /(?&t)(?#()(?(DEFINE)(?<t>a))/
- bac
- /--- COMMIT should override THEN ---/
- /(?>(*COMMIT)(?>yes|no)(*THEN)(*F))?/
- yes
- /(?>(*COMMIT)(yes|no)(*THEN)(*F))?/
- yes
- /b?(*SKIP)c/
- bc
- abc
-
- /(*SKIP)bc/
- a
- /(*SKIP)b/
- a
- /(?P<abn>(?P=abn)xxx|)+/
- xxx
- /(?i:([^b]))(?1)/
- aa
- aA
- ** Failers
- ab
- aB
- Ba
- ba
- /^(?&t)*+(?(DEFINE)(?<t>a))\w$/
- aaaaaaX
- ** Failers
- aaaaaa
- /^(?&t)*(?(DEFINE)(?<t>a))\w$/
- aaaaaaX
- aaaaaa
- /^(a)*+(\w)/
- aaaaX
- YZ
- ** Failers
- aaaa
- /^(?:a)*+(\w)/
- aaaaX
- YZ
- ** Failers
- aaaa
- /^(a)++(\w)/
- aaaaX
- ** Failers
- aaaa
- YZ
- /^(?:a)++(\w)/
- aaaaX
- ** Failers
- aaaa
- YZ
- /^(a)?+(\w)/
- aaaaX
- YZ
- /^(?:a)?+(\w)/
- aaaaX
- YZ
- /^(a){2,}+(\w)/
- aaaaX
- ** Failers
- aaa
- YZ
- /^(?:a){2,}+(\w)/
- aaaaX
- ** Failers
- aaa
- YZ
- /(a|)*(?1)b/
- b
- ab
- aab
- /(a)++(?1)b/
- ** Failers
- ab
- aab
- /(a)*+(?1)b/
- ** Failers
- ab
- aab
- /(?1)(?:(b)){0}/
- b
- /(foo ( \( ((?:(?> [^()]+ )|(?2))*) \) ) )/x
- foo(bar(baz)+baz(bop))
- /(A (A|B(*ACCEPT)|C) D)(E)/x
- AB
- /\A.*?(a|bc)/
- ba
- /\A.*?(?:a|bc)++/
- ba
- /\A.*?(a|bc)++/
- ba
- /\A.*?(?:a|bc|d)/
- ba
- /(?:(b))++/
- beetle
- /(?(?=(a(*ACCEPT)z))a)/
- a
- /^(a)(?1)+ab/
- aaaab
-
- /^(a)(?1)++ab/
- aaaab
- /^(?=a(*:M))aZ/K
- aZbc
- /^(?!(*:M)b)aZ/K
- aZbc
- /(?(DEFINE)(a))?b(?1)/
- backgammon
- /^\N+/
- abc\ndef
-
- /^\N{1,}/
- abc\ndef
- /(?(R)a+|(?R)b)/
- aaaabcde
- /(?(R)a+|((?R))b)/
- aaaabcde
- /((?(R)a+|(?1)b))/
- aaaabcde
- /((?(R1)a+|(?1)b))/
- aaaabcde
-
- /((?(R)a|(?1)))*/
- aaa
- /((?(R)a|(?1)))+/
- aaa
- /a(*:any
- name)/K
- abc
-
- /(?>(?&t)c|(?&t))(?(DEFINE)(?<t>a|b(*PRUNE)c))/
- a
- ba
- bba
-
- /--- Checking revised (*THEN) handling ---/
- /--- Capture ---/
- /^.*? (a(*THEN)b) c/x
- aabc
- /^.*? (a(*THEN)b|(*F)) c/x
- aabc
- /^.*? ( (a(*THEN)b) | (*F) ) c/x
- aabc
- /^.*? ( (a(*THEN)b) ) c/x
- aabc
- /--- Non-capture ---/
- /^.*? (?:a(*THEN)b) c/x
- aabc
- /^.*? (?:a(*THEN)b|(*F)) c/x
- aabc
- /^.*? (?: (?:a(*THEN)b) | (*F) ) c/x
- aabc
- /^.*? (?: (?:a(*THEN)b) ) c/x
- aabc
- /--- Atomic ---/
- /^.*? (?>a(*THEN)b) c/x
- aabc
- /^.*? (?>a(*THEN)b|(*F)) c/x
- aabc
- /^.*? (?> (?>a(*THEN)b) | (*F) ) c/x
- aabc
- /^.*? (?> (?>a(*THEN)b) ) c/x
- aabc
- /--- Possessive capture ---/
- /^.*? (a(*THEN)b)++ c/x
- aabc
- /^.*? (a(*THEN)b|(*F))++ c/x
- aabc
- /^.*? ( (a(*THEN)b)++ | (*F) )++ c/x
- aabc
- /^.*? ( (a(*THEN)b)++ )++ c/x
- aabc
- /--- Possessive non-capture ---/
- /^.*? (?:a(*THEN)b)++ c/x
- aabc
- /^.*? (?:a(*THEN)b|(*F))++ c/x
- aabc
- /^.*? (?: (?:a(*THEN)b)++ | (*F) )++ c/x
- aabc
- /^.*? (?: (?:a(*THEN)b)++ )++ c/x
- aabc
-
- /--- Condition assertion ---/
- /^(?(?=a(*THEN)b)ab|ac)/
- ac
-
- /--- Condition ---/
- /^.*?(?(?=a)a|b(*THEN)c)/
- ba
- /^.*?(?:(?(?=a)a|b(*THEN)c)|d)/
- ba
- /^.*?(?(?=a)a(*THEN)b|c)/
- ac
- /--- Assertion ---/
- /^.*(?=a(*THEN)b)/
- aabc
- /------------------------------/
- /(?>a(*:m))/imsxSK
- a
- /(?>(a)(*:m))/imsxSK
- a
- /(?<=a(*ACCEPT)b)c/
- xacd
- /(?<=(a(*ACCEPT)b))c/
- xacd
- /(?<=(a(*COMMIT)b))c/
- xabcd
- ** Failers
- xacd
-
- /(?<!a(*FAIL)b)c/
- xcd
- acd
- /(?<=a(*:N)b)c/K
- xabcd
-
- /(?<=a(*PRUNE)b)c/
- xabcd
- /(?<=a(*SKIP)b)c/
- xabcd
- /(?<=a(*THEN)b)c/
- xabcd
- /(a)(?2){2}(.)/
- abcd
- /(*MARK:A)(*PRUNE:B)(C|X)/KS
- C
- D
- /(*MARK:A)(*PRUNE:B)(C|X)/KSS
- C
- D
- /(*MARK:A)(*THEN:B)(C|X)/KS
- C
- D
- /(*MARK:A)(*THEN:B)(C|X)/KSY
- C
- D
- /(*MARK:A)(*THEN:B)(C|X)/KSS
- C
- D
- /--- This should fail, as the skip causes a bump to offset 3 (the skip) ---/
- /A(*MARK:A)A+(*SKIP)(B|Z) | AC/xK
- AAAC
- /--- Same --/
- /A(*MARK:A)A+(*MARK:B)(*SKIP:B)(B|Z) | AC/xK
- AAAC
- /A(*:A)A+(*SKIP)(B|Z) | AC/xK
- AAAC
- /--- This should fail, as a null name is the same as no name ---/
- /A(*MARK:A)A+(*SKIP:)(B|Z) | AC/xK
- AAAC
- /--- A check on what happens after hitting a mark and them bumping along to
- something that does not even start. Perl reports tags after the failures here,
- though it does not when the individual letters are made into something
- more complicated. ---/
- /A(*:A)B|XX(*:B)Y/K
- AABC
- XXYZ
- ** Failers
- XAQQ
- XAQQXZZ
- AXQQQ
- AXXQQQ
-
- /^(A(*THEN:A)B|C(*THEN:B)D)/K
- AB
- CD
- ** Failers
- AC
- CB
-
- /^(A(*PRUNE:A)B|C(*PRUNE:B)D)/K
- AB
- CD
- ** Failers
- AC
- CB
-
- /--- An empty name does not pass back an empty string. It is the same as if no
- name were given. ---/
- /^(A(*PRUNE:)B|C(*PRUNE:B)D)/K
- AB
- CD
- /--- PRUNE goes to next bumpalong; COMMIT does not. ---/
-
- /A(*PRUNE:A)B/K
- ACAB
- /--- Mark names can be duplicated ---/
- /A(*:A)B|X(*:A)Y/K
- AABC
- XXYZ
-
- /b(*:m)f|a(*:n)w/K
- aw
- ** Failers
- abc
- /b(*:m)f|aw/K
- abaw
- ** Failers
- abc
- abax
- /A(*MARK:A)A+(*SKIP:B)(B|Z) | AAC/xK
- AAAC
- /a(*PRUNE:X)bc|qq/KY
- ** Failers
- axy
- /a(*THEN:X)bc|qq/KY
- ** Failers
- axy
- /(?=a(*MARK:A)b)..x/K
- abxy
- ** Failers
- abpq
- /(?=a(*MARK:A)b)..(*:Y)x/K
- abxy
- ** Failers
- abpq
- /(?=a(*PRUNE:A)b)..x/K
- abxy
- ** Failers
- abpq
- /(?=a(*PRUNE:A)b)..(*:Y)x/K
- abxy
- ** Failers
- abpq
- /(?=a(*THEN:A)b)..x/K
- abxy
- ** Failers
- abpq
- /(?=a(*THEN:A)b)..(*:Y)x/K
- abxy
- ** Failers
- abpq
- /(another)?(\1?)test/
- hello world test
- /(another)?(\1+)test/
- hello world test
- /(a(*COMMIT)b){0}a(?1)|aac/
- aac
- /((?:a?)*)*c/
- aac
- /((?>a?)*)*c/
- aac
- /(?>.*?a)(?<=ba)/
- aba
- /(?:.*?a)(?<=ba)/
- aba
- /.*?a(*PRUNE)b/
- aab
- /.*?a(*PRUNE)b/s
- aab
- /^a(*PRUNE)b/s
- aab
- /.*?a(*SKIP)b/
- aab
- /(?>.*?a)b/s
- aab
- /(?>.*?a)b/
- aab
- /(?>^a)b/s
- aab
- /(?>.*?)(?<=(abcd)|(wxyz))/
- alphabetabcd
- endingwxyz
- /(?>.*)(?<=(abcd)|(wxyz))/
- alphabetabcd
- endingwxyz
- "(?>.*)foo"
- abcdfooxyz
-
- "(?>.*?)foo"
- abcdfooxyz
- /(?:(a(*PRUNE)b)){0}(?:(?1)|ac)/
- ac
-
- /(?:(a(*SKIP)b)){0}(?:(?1)|ac)/
- ac
- /(?<=(*SKIP)ac)a/
- aa
- /A(*MARK:A)A+(*SKIP:B)(B|Z) | AC/xK
- AAAC
- /a(*SKIP:m)x|ac(*:n)(*SKIP:n)d|ac/K
- acacd
- /A(*SKIP:m)x|A(*SKIP:n)x|AB/K
- AB
- /((*SKIP:r)d){0}a(*SKIP:m)x|ac(*:n)|ac/K
- acacd
- /-- Tests that try to figure out how Perl works. My hypothesis is that the
- first verb that is backtracked onto is the one that acts. This seems to be
- the case almost all the time, but there is one exception that is perhaps a
- bug. --/
- /-- This matches "aaaac"; each PRUNE advances one character until the subject
- no longer starts with 5 'a's. --/
- /aaaaa(*PRUNE)b|a+c/
- aaaaaac
- /-- Putting SKIP in front of PRUNE makes no difference, as it is never
- backtracked onto, whether or not it has a label. --/
- /aaaaa(*SKIP)(*PRUNE)b|a+c/
- aaaaaac
- /aaaaa(*SKIP:N)(*PRUNE)b|a+c/
- aaaaaac
- /aaaa(*:N)a(*SKIP:N)(*PRUNE)b|a+c/
- aaaaaac
- /-- Putting THEN in front makes no difference. */
-
- /aaaaa(*THEN)(*PRUNE)b|a+c/
- aaaaaac
-
- /-- However, putting COMMIT in front of the prune changes it to "no match". I
- think this is inconsistent and possibly a bug. For the moment, running this
- test is moved out of the Perl-compatible file. --/
- /aaaaa(*COMMIT)(*PRUNE)b|a+c/
-
- /---- OK, lets play the same game again using SKIP instead of PRUNE. ----/
- /-- This matches "ac" because SKIP forces the next match to start on the
- sixth "a". --/
- /aaaaa(*SKIP)b|a+c/
- aaaaaac
-
- /-- Putting PRUNE in front makes no difference. --/
- /aaaaa(*PRUNE)(*SKIP)b|a+c/
- aaaaaac
- /-- Putting THEN in front makes no difference. --/
- /aaaaa(*THEN)(*SKIP)b|a+c/
- aaaaaac
- /-- In this case, neither does COMMIT. This still matches "ac". --/
- /aaaaa(*COMMIT)(*SKIP)b|a+c/
- aaaaaac
-
- /-- This gives "no match", as expected. --/
- /aaaaa(*COMMIT)b|a+c/
- aaaaaac
-
- /------ Tests using THEN ------/
- /-- This matches "aaaaaac", as expected. --/
- /aaaaa(*THEN)b|a+c/
- aaaaaac
- /-- Putting SKIP in front makes no difference. --/
- /aaaaa(*SKIP)(*THEN)b|a+c/
- aaaaaac
-
- /-- Putting PRUNE in front makes no difference. --/
- /aaaaa(*PRUNE)(*THEN)b|a+c/
- aaaaaac
-
- /-- Putting COMMIT in front makes no difference. --/
- /aaaaa(*COMMIT)(*THEN)b|a+c/
- aaaaaac
-
- /-- End of "priority" tests --/
- /aaaaa(*:m)(*PRUNE:m)(*SKIP:m)m|a+/
- aaaaaa
- /aaaaa(*:m)(*MARK:m)(*PRUNE)(*SKIP:m)m|a+/
- aaaaaa
- /aaaaa(*:n)(*PRUNE:m)(*SKIP:m)m|a+/
- aaaaaa
- /aaaaa(*:n)(*MARK:m)(*PRUNE)(*SKIP:m)m|a+/
- aaaaaa
- /a(*MARK:A)aa(*PRUNE:A)a(*SKIP:A)b|a+c/
- aaaac
- /a(*MARK:A)aa(*MARK:A)a(*SKIP:A)b|a+c/
- aaaac
- /aaa(*PRUNE:A)a(*SKIP:A)b|a+c/
- aaaac
- /aaa(*MARK:A)a(*SKIP:A)b|a+c/
- aaaac
- /a(*:m)a(*COMMIT)(*SKIP:m)b|a+c/K
- aaaaaac
- /.?(a|b(*THEN)c)/
- ba
- /(a(*COMMIT)b)c|abd/
- abc
- abd
- /(?=a(*COMMIT)b)abc|abd/
- abc
- abd
- /(?>a(*COMMIT)b)c|abd/
- abc
- abd
- /a(?=b(*COMMIT)c)[^d]|abd/
- abd
- abc
- /a(?=bc).|abd/
- abd
- abc
-
- /a(?>b(*COMMIT)c)d|abd/
- abceabd
- /a(?>bc)d|abd/
- abceabd
- /(?>a(*COMMIT)b)c|abd/
- abd
- /(?>a(*COMMIT)c)d|abd/
- abd
- /((?=a(*COMMIT)b)ab|ac){0}(?:(?1)|a(c))/
- ac
-
- /-- These tests were formerly in test 2, but changes in PCRE and Perl have
- made them compatible. --/
-
- /^(a)?(?(1)a|b)+$/
- *** Failers
- a
- /(?=a\Kb)ab/
- ab
- /(?!a\Kb)ac/
- ac
-
- /^abc(?<=b\Kc)d/
- abcd
- /^abc(?<!b\Kq)d/
- abcd
- /A(*PRUNE:A)A+(*SKIP:A)(B|Z) | AC/xK
- AAAC
- /^((abc|abcx)(*THEN)y|abcd)/
- abcd
- *** Failers
- abcxy
-
- /^((yes|no)(*THEN)(*F))?/
- yes
- /(A (.*) C? (*THEN) | A D) (*FAIL)/x
- AbcdCBefgBhiBqz
- /(A (.*) C? (*THEN) | A D) z/x
- AbcdCBefgBhiBqz
- /(A (.*) C? (*THEN) | A D) \s* (*FAIL)/x
- AbcdCBefgBhiBqz
- /(A (.*) C? (*THEN) | A D) \s* z/x
- AbcdCBefgBhiBqz
- /(A (.*) (?:C|) (*THEN) | A D) (*FAIL)/x
- AbcdCBefgBhiBqz
- /(A (.*) (?:C|) (*THEN) | A D) z/x
- AbcdCBefgBhiBqz
- /(A (.*) C{0,6} (*THEN) | A D) (*FAIL)/x
- AbcdCBefgBhiBqz
- /(A (.*) C{0,6} (*THEN) | A D) z/x
- AbcdCBefgBhiBqz
- /(A (.*) (CE){0,6} (*THEN) | A D) (*FAIL)/x
- AbcdCEBefgBhiBqz
- /(A (.*) (CE){0,6} (*THEN) | A D) z/x
- AbcdCEBefgBhiBqz
- /(A (.*) (CE*){0,6} (*THEN) | A D) (*FAIL)/x
- AbcdCBefgBhiBqz
- /(A (.*) (CE*){0,6} (*THEN) | A D) z/x
- AbcdCBefgBhiBqz
- /(?=a(*COMMIT)b|ac)ac|ac/
- ac
- /(?=a(*COMMIT)b|(ac)) ac | (a)c/x
- ac
- /--------/
- /(?(?!b(*THEN)a)bn|bnn)/
- bnn
- /(?!b(*SKIP)a)bn|bnn/
- bnn
-
- /(?(?!b(*SKIP)a)bn|bnn)/
- bnn
- /(?!b(*PRUNE)a)bn|bnn/
- bnn
-
- /(?(?!b(*PRUNE)a)bn|bnn)/
- bnn
-
- /(?!b(*COMMIT)a)bn|bnn/
- bnn
-
- /(?(?!b(*COMMIT)a)bn|bnn)/
- bnn
- /(?=b(*SKIP)a)bn|bnn/
- bnn
- /(?=b(*THEN)a)bn|bnn/
- bnn
-
- /^(?!a(*SKIP)b)/
- ac
- /^(?!a(*SKIP)b)../
- acd
- /(?!a(*SKIP)b)../
- acd
- /^(?(?!a(*SKIP)b))/
- ac
- /^(?!a(*PRUNE)b)../
- acd
- /(?!a(*PRUNE)b)../
- acd
- /(?!a(*COMMIT)b)ac|cd/
- ac
- /\A.*?(?:a|bc)/
- ba
- /^(A(*THEN)B|C(*THEN)D)/
- CD
- /(*:m(m)(?&y)(?(DEFINE)(?<y>b))/K
- abc
- /(*PRUNE:m(m)(?&y)(?(DEFINE)(?<y>b))/K
- abc
- /(*SKIP:m(m)(?&y)(?(DEFINE)(?<y>b))/K
- abc
- /(*THEN:m(m)(?&y)(?(DEFINE)(?<y>b))/K
- abc
- /^\d*\w{4}/
- 1234
- 123
- /^[^b]*\w{4}/
- aaaa
- aaa
- /^[^b]*\w{4}/i
- aaaa
- aaa
- /^a*\w{4}/
- aaaa
- aaa
- /^a*\w{4}/i
- aaaa
- aaa
- /(?(?=ab)ab)/+
- ca
- cd
- /(?:(?<n>foo)|(?<n>bar))\k<n>/J
- foofoo
- barbar
- /(?<n>A)(?:(?<n>foo)|(?<n>bar))\k<n>/J
- AfooA
- AbarA
- ** Failers
- Afoofoo
- Abarbar
- /^(\d+)\s+IN\s+SOA\s+(\S+)\s+(\S+)\s*\(\s*$/
- 1 IN SOA non-sp1 non-sp2(
- /^ (?:(?<A>A)|(?'B'B)(?<A>A)) (?('A')x) (?(<B>)y)$/xJ
- Ax
- BAxy
-
- /^A\xZ/
- A\0Z
- /^A\o{123}B/
- A\123B
- / ^ a + + b $ /x
- aaaab
-
- / ^ a + #comment
- + b $ /x
- aaaab
-
- / ^ a + #comment
- #comment
- + b $ /x
- aaaab
-
- / ^ (?> a + ) b $ /x
- aaaab
- / ^ ( a + ) + + \w $ /x
- aaaab
- /(?:a\Kb)*+/+
- ababc
- /(?>a\Kb)*/+
- ababc
- /(?:a\Kb)*/+
- ababc
- /(a\Kb)*+/+
- ababc
- /(a\Kb)*/+
- ababc
- /(?:x|(?:(xx|yy)+|x|x|x|x|x)|a|a|a)bc/
- acb
- '\A(?:[^\"]++|\"(?:[^\"]*+|\"\")*+\")++'
- NON QUOTED \"QUOT\"\"ED\" AFTER \"NOT MATCHED
- '\A(?:[^\"]++|\"(?:[^\"]++|\"\")*+\")++'
- NON QUOTED \"QUOT\"\"ED\" AFTER \"NOT MATCHED
- '\A(?:[^\"]++|\"(?:[^\"]++|\"\")++\")++'
- NON QUOTED \"QUOT\"\"ED\" AFTER \"NOT MATCHED
- '\A([^\"1]++|[\"2]([^\"3]*+|[\"4][\"5])*+[\"6])++'
- NON QUOTED \"QUOT\"\"ED\" AFTER \"NOT MATCHED
- /^\w+(?>\s*)(?<=\w)/
- test test
- /(?P<same>a)(?P<same>b)/gJ
- abbaba
- /(?P<same>a)(?P<same>b)(?P=same)/gJ
- abbaba
- /(?P=same)?(?P<same>a)(?P<same>b)/gJ
- abbaba
- /(?:(?P=same)?(?:(?P<same>a)|(?P<same>b))(?P=same))+/gJ
- bbbaaabaabb
- /(?:(?P=same)?(?:(?P=same)(?P<same>a)(?P=same)|(?P=same)?(?P<same>b)(?P=same)){2}(?P=same)(?P<same>c)(?P=same)){2}(?P<same>z)?/gJ
- bbbaaaccccaaabbbcc
- /(?P<Name>a)?(?P<Name2>b)?(?(<Name>)c|d)*l/
- acl
- bdl
- adl
- bcl
- /\sabc/
- \x{0b}abc
- /[\Qa]\E]+/
- aa]]
- /[\Q]a\E]+/
- aa]]
- /(?:((abcd))|(((?:(?:(?:(?:abc|(?:abcdef))))b)abcdefghi)abc)|((*ACCEPT)))/
- 1234abcd
- /(\2)(\1)/
- "Z*(|d*){216}"
- "(?1)(?#?'){8}(a)"
- baaaaaaaaac
- "(?|(\k'Pm')|(?'Pm'))"
- abcd
- /(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])(?=.*[,;:])(?=.{8,16})(?!.*[\s])/
- \ Fred:099
- /(?=.*X)X$/
- \ X
-
- /X+(?#comment)?/
- >XXX<
- / (?<word> \w+ )* \. /xi
- pokus.
-
- /(?(DEFINE) (?<word> \w+ ) ) (?&word)* \./xi
- pokus.
- /(?(DEFINE) (?<word> \w+ ) ) ( (?&word)* ) \./xi
- pokus.
- /(?&word)* (?(DEFINE) (?<word> \w+ ) ) \./xi
- pokus.
- /(?&word)* \. (?<word> \w+ )/xi
- pokus.hokus
- /-- End of testinput1 --/
|