testinput8 83 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851
  1. /-- This set of tests check the DFA matching functionality of pcre_dfa_exec(),
  2. excluding UTF and Unicode property support. The -dfa flag must be used with
  3. pcretest when running it. --/
  4. < forbid 8W
  5. /abc/
  6. abc
  7. /ab*c/
  8. abc
  9. abbbbc
  10. ac
  11. /ab+c/
  12. abc
  13. abbbbbbc
  14. *** Failers
  15. ac
  16. ab
  17. /a*/O
  18. a
  19. aaaaaaaaaaaaaaaaa
  20. aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  21. aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\F
  22. /(a|abcd|african)/
  23. a
  24. abcd
  25. african
  26. /^abc/
  27. abcdef
  28. *** Failers
  29. xyzabc
  30. xyz\nabc
  31. /^abc/m
  32. abcdef
  33. xyz\nabc
  34. *** Failers
  35. xyzabc
  36. /\Aabc/
  37. abcdef
  38. *** Failers
  39. xyzabc
  40. xyz\nabc
  41. /\Aabc/m
  42. abcdef
  43. *** Failers
  44. xyzabc
  45. xyz\nabc
  46. /\Gabc/
  47. abcdef
  48. xyzabc\>3
  49. *** Failers
  50. xyzabc
  51. xyzabc\>2
  52. /x\dy\Dz/
  53. x9yzz
  54. x0y+z
  55. *** Failers
  56. xyz
  57. xxy0z
  58. /x\sy\Sz/
  59. x yzz
  60. x y+z
  61. *** Failers
  62. xyz
  63. xxyyz
  64. /x\wy\Wz/
  65. xxy+z
  66. *** Failers
  67. xxy0z
  68. x+y+z
  69. /x.y/
  70. x+y
  71. x-y
  72. *** Failers
  73. x\ny
  74. /x.y/s
  75. x+y
  76. x-y
  77. x\ny
  78. /(a.b(?s)c.d|x.y)p.q/
  79. a+bc+dp+q
  80. a+bc\ndp+q
  81. x\nyp+q
  82. *** Failers
  83. a\nbc\ndp+q
  84. a+bc\ndp\nq
  85. x\nyp\nq
  86. /a\d\z/
  87. ba0
  88. *** Failers
  89. ba0\n
  90. ba0\ncd
  91. /a\d\z/m
  92. ba0
  93. *** Failers
  94. ba0\n
  95. ba0\ncd
  96. /a\d\Z/
  97. ba0
  98. ba0\n
  99. *** Failers
  100. ba0\ncd
  101. /a\d\Z/m
  102. ba0
  103. ba0\n
  104. *** Failers
  105. ba0\ncd
  106. /a\d$/
  107. ba0
  108. ba0\n
  109. *** Failers
  110. ba0\ncd
  111. /a\d$/m
  112. ba0
  113. ba0\n
  114. ba0\ncd
  115. *** Failers
  116. /abc/i
  117. abc
  118. aBc
  119. ABC
  120. /[^a]/
  121. abcd
  122. /ab?\w/
  123. abz
  124. abbz
  125. azz
  126. /x{0,3}yz/
  127. ayzq
  128. axyzq
  129. axxyz
  130. axxxyzq
  131. axxxxyzq
  132. *** Failers
  133. ax
  134. axx
  135. /x{3}yz/
  136. axxxyzq
  137. axxxxyzq
  138. *** Failers
  139. ax
  140. axx
  141. ayzq
  142. axyzq
  143. axxyz
  144. /x{2,3}yz/
  145. axxyz
  146. axxxyzq
  147. axxxxyzq
  148. *** Failers
  149. ax
  150. axx
  151. ayzq
  152. axyzq
  153. /[^a]+/O
  154. bac
  155. bcdefax
  156. *** Failers
  157. aaaaa
  158. /[^a]*/O
  159. bac
  160. bcdefax
  161. *** Failers
  162. aaaaa
  163. /[^a]{3,5}/O
  164. xyz
  165. awxyza
  166. abcdefa
  167. abcdefghijk
  168. *** Failers
  169. axya
  170. axa
  171. aaaaa
  172. /\d*/
  173. 1234b567
  174. xyz
  175. /\D*/
  176. a1234b567
  177. xyz
  178. /\d+/
  179. ab1234c56
  180. *** Failers
  181. xyz
  182. /\D+/
  183. ab123c56
  184. *** Failers
  185. 789
  186. /\d?A/
  187. 045ABC
  188. ABC
  189. *** Failers
  190. XYZ
  191. /\D?A/
  192. ABC
  193. BAC
  194. 9ABC
  195. *** Failers
  196. /a+/
  197. aaaa
  198. /^.*xyz/
  199. xyz
  200. ggggggggxyz
  201. /^.+xyz/
  202. abcdxyz
  203. axyz
  204. *** Failers
  205. xyz
  206. /^.?xyz/
  207. xyz
  208. cxyz
  209. /^\d{2,3}X/
  210. 12X
  211. 123X
  212. *** Failers
  213. X
  214. 1X
  215. 1234X
  216. /^[abcd]\d/
  217. a45
  218. b93
  219. c99z
  220. d04
  221. *** Failers
  222. e45
  223. abcd
  224. abcd1234
  225. 1234
  226. /^[abcd]*\d/
  227. a45
  228. b93
  229. c99z
  230. d04
  231. abcd1234
  232. 1234
  233. *** Failers
  234. e45
  235. abcd
  236. /^[abcd]+\d/
  237. a45
  238. b93
  239. c99z
  240. d04
  241. abcd1234
  242. *** Failers
  243. 1234
  244. e45
  245. abcd
  246. /^a+X/
  247. aX
  248. aaX
  249. /^[abcd]?\d/
  250. a45
  251. b93
  252. c99z
  253. d04
  254. 1234
  255. *** Failers
  256. abcd1234
  257. e45
  258. /^[abcd]{2,3}\d/
  259. ab45
  260. bcd93
  261. *** Failers
  262. 1234
  263. a36
  264. abcd1234
  265. ee45
  266. /^(abc)*\d/
  267. abc45
  268. abcabcabc45
  269. 42xyz
  270. *** Failers
  271. /^(abc)+\d/
  272. abc45
  273. abcabcabc45
  274. *** Failers
  275. 42xyz
  276. /^(abc)?\d/
  277. abc45
  278. 42xyz
  279. *** Failers
  280. abcabcabc45
  281. /^(abc){2,3}\d/
  282. abcabc45
  283. abcabcabc45
  284. *** Failers
  285. abcabcabcabc45
  286. abc45
  287. 42xyz
  288. /1(abc|xyz)2(?1)3/
  289. 1abc2abc3456
  290. 1abc2xyz3456
  291. /^(a*\w|ab)=(a*\w|ab)/
  292. ab=ab
  293. /^(a*\w|ab)=(?1)/
  294. ab=ab
  295. /^([^()]|\((?1)*\))*$/
  296. abc
  297. a(b)c
  298. a(b(c))d
  299. *** Failers)
  300. a(b(c)d
  301. /^>abc>([^()]|\((?1)*\))*<xyz<$/
  302. >abc>123<xyz<
  303. >abc>1(2)3<xyz<
  304. >abc>(1(2)3)<xyz<
  305. /^(?>a*)\d/
  306. aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa9876
  307. *** Failers
  308. aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  309. /< (?: (?(R) \d++ | [^<>]*+) | (?R)) * >/x
  310. <>
  311. <abcd>
  312. <abc <123> hij>
  313. <abc <def> hij>
  314. <abc<>def>
  315. <abc<>
  316. *** Failers
  317. <abc
  318. /^(?(?=abc)\w{3}:|\d\d)$/
  319. abc:
  320. 12
  321. *** Failers
  322. 123
  323. xyz
  324. /^(?(?!abc)\d\d|\w{3}:)$/
  325. abc:
  326. 12
  327. *** Failers
  328. 123
  329. xyz
  330. /^(?=abc)\w{5}:$/
  331. abcde:
  332. *** Failers
  333. abc..
  334. 123
  335. vwxyz
  336. /^(?!abc)\d\d$/
  337. 12
  338. *** Failers
  339. abcde:
  340. abc..
  341. 123
  342. vwxyz
  343. /(?<=abc|xy)123/
  344. abc12345
  345. wxy123z
  346. *** Failers
  347. 123abc
  348. /(?<!abc|xy)123/
  349. 123abc
  350. mno123456
  351. *** Failers
  352. abc12345
  353. wxy123z
  354. /abc(?C1)xyz/
  355. abcxyz
  356. 123abcxyz999
  357. /(ab|cd){3,4}/C
  358. ababab
  359. abcdabcd
  360. abcdcdcdcdcd
  361. /^abc/
  362. abcdef
  363. *** Failers
  364. abcdef\B
  365. /^(a*|xyz)/
  366. bcd
  367. aaabcd
  368. xyz
  369. xyz\N
  370. *** Failers
  371. bcd\N
  372. /xyz$/
  373. xyz
  374. xyz\n
  375. *** Failers
  376. xyz\Z
  377. xyz\n\Z
  378. /xyz$/m
  379. xyz
  380. xyz\n
  381. abcxyz\npqr
  382. abcxyz\npqr\Z
  383. xyz\n\Z
  384. *** Failers
  385. xyz\Z
  386. /\Gabc/
  387. abcdef
  388. defabcxyz\>3
  389. *** Failers
  390. defabcxyz
  391. /^abcdef/
  392. ab\P
  393. abcde\P
  394. abcdef\P
  395. *** Failers
  396. abx\P
  397. /^a{2,4}\d+z/
  398. a\P
  399. aa\P
  400. aa2\P
  401. aaa\P
  402. aaa23\P
  403. aaaa12345\P
  404. aa0z\P
  405. aaaa4444444444444z\P
  406. *** Failers
  407. az\P
  408. aaaaa\P
  409. a56\P
  410. /^abcdef/
  411. abc\P
  412. def\R
  413. /(?<=foo)bar/
  414. xyzfo\P
  415. foob\P\>2
  416. foobar...\R\P\>4
  417. xyzfo\P
  418. foobar\>2
  419. *** Failers
  420. xyzfo\P
  421. obar\R
  422. /(ab*(cd|ef))+X/
  423. adfadadaklhlkalkajhlkjahdfasdfasdfladsfjkj\P\Z
  424. lkjhlkjhlkjhlkjhabbbbbbcdaefabbbbbbbefa\P\B\Z
  425. cdabbbbbbbb\P\R\B\Z
  426. efabbbbbbbbbbbbbbbb\P\R\B\Z
  427. bbbbbbbbbbbbcdXyasdfadf\P\R\B\Z
  428. /(a|b)/SF>testsavedregex
  429. <testsavedregex
  430. abc
  431. ** Failers
  432. def
  433. /the quick brown fox/
  434. the quick brown fox
  435. The quick brown FOX
  436. What do you know about the quick brown fox?
  437. What do you know about THE QUICK BROWN FOX?
  438. /The quick brown fox/i
  439. the quick brown fox
  440. The quick brown FOX
  441. What do you know about the quick brown fox?
  442. What do you know about THE QUICK BROWN FOX?
  443. /abcd\t\n\r\f\a\e\071\x3b\$\\\?caxyz/
  444. abcd\t\n\r\f\a\e9;\$\\?caxyz
  445. /a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz/
  446. abxyzpqrrrabbxyyyypqAzz
  447. abxyzpqrrrabbxyyyypqAzz
  448. aabxyzpqrrrabbxyyyypqAzz
  449. aaabxyzpqrrrabbxyyyypqAzz
  450. aaaabxyzpqrrrabbxyyyypqAzz
  451. abcxyzpqrrrabbxyyyypqAzz
  452. aabcxyzpqrrrabbxyyyypqAzz
  453. aaabcxyzpqrrrabbxyyyypAzz
  454. aaabcxyzpqrrrabbxyyyypqAzz
  455. aaabcxyzpqrrrabbxyyyypqqAzz
  456. aaabcxyzpqrrrabbxyyyypqqqAzz
  457. aaabcxyzpqrrrabbxyyyypqqqqAzz
  458. aaabcxyzpqrrrabbxyyyypqqqqqAzz
  459. aaabcxyzpqrrrabbxyyyypqqqqqqAzz
  460. aaaabcxyzpqrrrabbxyyyypqAzz
  461. abxyzzpqrrrabbxyyyypqAzz
  462. aabxyzzzpqrrrabbxyyyypqAzz
  463. aaabxyzzzzpqrrrabbxyyyypqAzz
  464. aaaabxyzzzzpqrrrabbxyyyypqAzz
  465. abcxyzzpqrrrabbxyyyypqAzz
  466. aabcxyzzzpqrrrabbxyyyypqAzz
  467. aaabcxyzzzzpqrrrabbxyyyypqAzz
  468. aaaabcxyzzzzpqrrrabbxyyyypqAzz
  469. aaaabcxyzzzzpqrrrabbbxyyyypqAzz
  470. aaaabcxyzzzzpqrrrabbbxyyyyypqAzz
  471. aaabcxyzpqrrrabbxyyyypABzz
  472. aaabcxyzpqrrrabbxyyyypABBzz
  473. >>>aaabxyzpqrrrabbxyyyypqAzz
  474. >aaaabxyzpqrrrabbxyyyypqAzz
  475. >>>>abcxyzpqrrrabbxyyyypqAzz
  476. *** Failers
  477. abxyzpqrrabbxyyyypqAzz
  478. abxyzpqrrrrabbxyyyypqAzz
  479. abxyzpqrrrabxyyyypqAzz
  480. aaaabcxyzzzzpqrrrabbbxyyyyyypqAzz
  481. aaaabcxyzzzzpqrrrabbbxyyypqAzz
  482. aaabcxyzpqrrrabbxyyyypqqqqqqqAzz
  483. /^(abc){1,2}zz/
  484. abczz
  485. abcabczz
  486. *** Failers
  487. zz
  488. abcabcabczz
  489. >>abczz
  490. /^(b+?|a){1,2}?c/
  491. bc
  492. bbc
  493. bbbc
  494. bac
  495. bbac
  496. aac
  497. abbbbbbbbbbbc
  498. bbbbbbbbbbbac
  499. *** Failers
  500. aaac
  501. abbbbbbbbbbbac
  502. /^(b+|a){1,2}c/
  503. bc
  504. bbc
  505. bbbc
  506. bac
  507. bbac
  508. aac
  509. abbbbbbbbbbbc
  510. bbbbbbbbbbbac
  511. *** Failers
  512. aaac
  513. abbbbbbbbbbbac
  514. /^(b+|a){1,2}?bc/
  515. bbc
  516. /^(b*|ba){1,2}?bc/
  517. babc
  518. bbabc
  519. bababc
  520. *** Failers
  521. bababbc
  522. babababc
  523. /^(ba|b*){1,2}?bc/
  524. babc
  525. bbabc
  526. bababc
  527. *** Failers
  528. bababbc
  529. babababc
  530. /^\ca\cA\c[\c{\c:/
  531. \x01\x01\e;z
  532. /^[ab\]cde]/
  533. athing
  534. bthing
  535. ]thing
  536. cthing
  537. dthing
  538. ething
  539. *** Failers
  540. fthing
  541. [thing
  542. \\thing
  543. /^[]cde]/
  544. ]thing
  545. cthing
  546. dthing
  547. ething
  548. *** Failers
  549. athing
  550. fthing
  551. /^[^ab\]cde]/
  552. fthing
  553. [thing
  554. \\thing
  555. *** Failers
  556. athing
  557. bthing
  558. ]thing
  559. cthing
  560. dthing
  561. ething
  562. /^[^]cde]/
  563. athing
  564. fthing
  565. *** Failers
  566. ]thing
  567. cthing
  568. dthing
  569. ething
  570. /^\�/
  571. /^ÿ/
  572. ÿ
  573. /^[0-9]+$/
  574. 0
  575. 1
  576. 2
  577. 3
  578. 4
  579. 5
  580. 6
  581. 7
  582. 8
  583. 9
  584. 10
  585. 100
  586. *** Failers
  587. abc
  588. /^.*nter/
  589. enter
  590. inter
  591. uponter
  592. /^xxx[0-9]+$/
  593. xxx0
  594. xxx1234
  595. *** Failers
  596. xxx
  597. /^.+[0-9][0-9][0-9]$/
  598. x123
  599. xx123
  600. 123456
  601. *** Failers
  602. 123
  603. x1234
  604. /^.+?[0-9][0-9][0-9]$/
  605. x123
  606. xx123
  607. 123456
  608. *** Failers
  609. 123
  610. x1234
  611. /^([^!]+)!(.+)=apquxz\.ixr\.zzz\.ac\.uk$/
  612. abc!pqr=apquxz.ixr.zzz.ac.uk
  613. *** Failers
  614. !pqr=apquxz.ixr.zzz.ac.uk
  615. abc!=apquxz.ixr.zzz.ac.uk
  616. abc!pqr=apquxz:ixr.zzz.ac.uk
  617. abc!pqr=apquxz.ixr.zzz.ac.ukk
  618. /:/
  619. Well, we need a colon: somewhere
  620. *** Fail if we don't
  621. /([\da-f:]+)$/i
  622. 0abc
  623. abc
  624. fed
  625. E
  626. ::
  627. 5f03:12C0::932e
  628. fed def
  629. Any old stuff
  630. *** Failers
  631. 0zzz
  632. gzzz
  633. fed\x20
  634. Any old rubbish
  635. /^.*\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/
  636. .1.2.3
  637. A.12.123.0
  638. *** Failers
  639. .1.2.3333
  640. 1.2.3
  641. 1234.2.3
  642. /^(\d+)\s+IN\s+SOA\s+(\S+)\s+(\S+)\s*\(\s*$/
  643. 1 IN SOA non-sp1 non-sp2(
  644. 1 IN SOA non-sp1 non-sp2 (
  645. *** Failers
  646. 1IN SOA non-sp1 non-sp2(
  647. /^[a-zA-Z\d][a-zA-Z\d\-]*(\.[a-zA-Z\d][a-zA-z\d\-]*)*\.$/
  648. a.
  649. Z.
  650. 2.
  651. ab-c.pq-r.
  652. sxk.zzz.ac.uk.
  653. x-.y-.
  654. *** Failers
  655. -abc.peq.
  656. /^\*\.[a-z]([a-z\-\d]*[a-z\d]+)?(\.[a-z]([a-z\-\d]*[a-z\d]+)?)*$/
  657. *.a
  658. *.b0-a
  659. *.c3-b.c
  660. *.c-a.b-c
  661. *** Failers
  662. *.0
  663. *.a-
  664. *.a-b.c-
  665. *.c-a.0-c
  666. /^(?=ab(de))(abd)(e)/
  667. abde
  668. /^(?!(ab)de|x)(abd)(f)/
  669. abdf
  670. /^(?=(ab(cd)))(ab)/
  671. abcd
  672. /^[\da-f](\.[\da-f])*$/i
  673. a.b.c.d
  674. A.B.C.D
  675. a.b.c.1.2.3.C
  676. /^\".*\"\s*(;.*)?$/
  677. \"1234\"
  678. \"abcd\" ;
  679. \"\" ; rhubarb
  680. *** Failers
  681. \"1234\" : things
  682. /^$/
  683. \
  684. *** Failers
  685. / ^ a (?# begins with a) b\sc (?# then b c) $ (?# then end)/x
  686. ab c
  687. *** Failers
  688. abc
  689. ab cde
  690. /(?x) ^ a (?# begins with a) b\sc (?# then b c) $ (?# then end)/
  691. ab c
  692. *** Failers
  693. abc
  694. ab cde
  695. /^ a\ b[c ]d $/x
  696. a bcd
  697. a b d
  698. *** Failers
  699. abcd
  700. ab d
  701. /^(a(b(c)))(d(e(f)))(h(i(j)))(k(l(m)))$/
  702. abcdefhijklm
  703. /^(?:a(b(c)))(?:d(e(f)))(?:h(i(j)))(?:k(l(m)))$/
  704. abcdefhijklm
  705. /^[\w][\W][\s][\S][\d][\D][\b][\n][\c]][\022]/
  706. a+ Z0+\x08\n\x1d\x12
  707. /^[.^$|()*+?{,}]+/
  708. .^\$(*+)|{?,?}
  709. /^a*\w/
  710. z
  711. az
  712. aaaz
  713. a
  714. aa
  715. aaaa
  716. a+
  717. aa+
  718. /^a*?\w/
  719. z
  720. az
  721. aaaz
  722. a
  723. aa
  724. aaaa
  725. a+
  726. aa+
  727. /^a+\w/
  728. az
  729. aaaz
  730. aa
  731. aaaa
  732. aa+
  733. /^a+?\w/
  734. az
  735. aaaz
  736. aa
  737. aaaa
  738. aa+
  739. /^\d{8}\w{2,}/
  740. 1234567890
  741. 12345678ab
  742. 12345678__
  743. *** Failers
  744. 1234567
  745. /^[aeiou\d]{4,5}$/
  746. uoie
  747. 1234
  748. 12345
  749. aaaaa
  750. *** Failers
  751. 123456
  752. /^[aeiou\d]{4,5}?/
  753. uoie
  754. 1234
  755. 12345
  756. aaaaa
  757. 123456
  758. /^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]/
  759. From abcd Mon Sep 01 12:33:02 1997
  760. /^From\s+\S+\s+([a-zA-Z]{3}\s+){2}\d{1,2}\s+\d\d:\d\d/
  761. From abcd Mon Sep 01 12:33:02 1997
  762. From abcd Mon Sep 1 12:33:02 1997
  763. *** Failers
  764. From abcd Sep 01 12:33:02 1997
  765. /^12.34/s
  766. 12\n34
  767. 12\r34
  768. /\w+(?=\t)/
  769. the quick brown\t fox
  770. /foo(?!bar)(.*)/
  771. foobar is foolish see?
  772. /(?:(?!foo)...|^.{0,2})bar(.*)/
  773. foobar crowbar etc
  774. barrel
  775. 2barrel
  776. A barrel
  777. /^(\D*)(?=\d)(?!123)/
  778. abc456
  779. *** Failers
  780. abc123
  781. /^1234(?# test newlines
  782. inside)/
  783. 1234
  784. /^1234 #comment in extended re
  785. /x
  786. 1234
  787. /#rhubarb
  788. abcd/x
  789. abcd
  790. /^abcd#rhubarb/x
  791. abcd
  792. /(?!^)abc/
  793. the abc
  794. *** Failers
  795. abc
  796. /(?=^)abc/
  797. abc
  798. *** Failers
  799. the abc
  800. /^[ab]{1,3}(ab*|b)/O
  801. aabbbbb
  802. /^[ab]{1,3}?(ab*|b)/O
  803. aabbbbb
  804. /^[ab]{1,3}?(ab*?|b)/O
  805. aabbbbb
  806. /^[ab]{1,3}(ab*?|b)/O
  807. aabbbbb
  808. / (?: [\040\t] | \(
  809. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  810. \) )* # optional leading comment
  811. (?: (?:
  812. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  813. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  814. |
  815. " (?: # opening quote...
  816. [^\\\x80-\xff\n\015"] # Anything except backslash and quote
  817. | # or
  818. \\ [^\x80-\xff] # Escaped something (something != CR)
  819. )* " # closing quote
  820. ) # initial word
  821. (?: (?: [\040\t] | \(
  822. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  823. \) )* \. (?: [\040\t] | \(
  824. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  825. \) )* (?:
  826. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  827. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  828. |
  829. " (?: # opening quote...
  830. [^\\\x80-\xff\n\015"] # Anything except backslash and quote
  831. | # or
  832. \\ [^\x80-\xff] # Escaped something (something != CR)
  833. )* " # closing quote
  834. ) )* # further okay, if led by a period
  835. (?: [\040\t] | \(
  836. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  837. \) )* @ (?: [\040\t] | \(
  838. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  839. \) )* (?:
  840. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  841. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  842. | \[ # [
  843. (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
  844. \] # ]
  845. ) # initial subdomain
  846. (?: #
  847. (?: [\040\t] | \(
  848. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  849. \) )* \. # if led by a period...
  850. (?: [\040\t] | \(
  851. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  852. \) )* (?:
  853. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  854. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  855. | \[ # [
  856. (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
  857. \] # ]
  858. ) # ...further okay
  859. )*
  860. # address
  861. | # or
  862. (?:
  863. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  864. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  865. |
  866. " (?: # opening quote...
  867. [^\\\x80-\xff\n\015"] # Anything except backslash and quote
  868. | # or
  869. \\ [^\x80-\xff] # Escaped something (something != CR)
  870. )* " # closing quote
  871. ) # one word, optionally followed by....
  872. (?:
  873. [^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] | # atom and space parts, or...
  874. \(
  875. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  876. \) | # comments, or...
  877. " (?: # opening quote...
  878. [^\\\x80-\xff\n\015"] # Anything except backslash and quote
  879. | # or
  880. \\ [^\x80-\xff] # Escaped something (something != CR)
  881. )* " # closing quote
  882. # quoted strings
  883. )*
  884. < (?: [\040\t] | \(
  885. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  886. \) )* # leading <
  887. (?: @ (?: [\040\t] | \(
  888. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  889. \) )* (?:
  890. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  891. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  892. | \[ # [
  893. (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
  894. \] # ]
  895. ) # initial subdomain
  896. (?: #
  897. (?: [\040\t] | \(
  898. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  899. \) )* \. # if led by a period...
  900. (?: [\040\t] | \(
  901. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  902. \) )* (?:
  903. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  904. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  905. | \[ # [
  906. (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
  907. \] # ]
  908. ) # ...further okay
  909. )*
  910. (?: (?: [\040\t] | \(
  911. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  912. \) )* , (?: [\040\t] | \(
  913. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  914. \) )* @ (?: [\040\t] | \(
  915. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  916. \) )* (?:
  917. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  918. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  919. | \[ # [
  920. (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
  921. \] # ]
  922. ) # initial subdomain
  923. (?: #
  924. (?: [\040\t] | \(
  925. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  926. \) )* \. # if led by a period...
  927. (?: [\040\t] | \(
  928. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  929. \) )* (?:
  930. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  931. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  932. | \[ # [
  933. (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
  934. \] # ]
  935. ) # ...further okay
  936. )*
  937. )* # further okay, if led by comma
  938. : # closing colon
  939. (?: [\040\t] | \(
  940. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  941. \) )* )? # optional route
  942. (?:
  943. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  944. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  945. |
  946. " (?: # opening quote...
  947. [^\\\x80-\xff\n\015"] # Anything except backslash and quote
  948. | # or
  949. \\ [^\x80-\xff] # Escaped something (something != CR)
  950. )* " # closing quote
  951. ) # initial word
  952. (?: (?: [\040\t] | \(
  953. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  954. \) )* \. (?: [\040\t] | \(
  955. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  956. \) )* (?:
  957. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  958. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  959. |
  960. " (?: # opening quote...
  961. [^\\\x80-\xff\n\015"] # Anything except backslash and quote
  962. | # or
  963. \\ [^\x80-\xff] # Escaped something (something != CR)
  964. )* " # closing quote
  965. ) )* # further okay, if led by a period
  966. (?: [\040\t] | \(
  967. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  968. \) )* @ (?: [\040\t] | \(
  969. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  970. \) )* (?:
  971. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  972. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  973. | \[ # [
  974. (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
  975. \] # ]
  976. ) # initial subdomain
  977. (?: #
  978. (?: [\040\t] | \(
  979. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  980. \) )* \. # if led by a period...
  981. (?: [\040\t] | \(
  982. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  983. \) )* (?:
  984. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  985. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  986. | \[ # [
  987. (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
  988. \] # ]
  989. ) # ...further okay
  990. )*
  991. # address spec
  992. (?: [\040\t] | \(
  993. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  994. \) )* > # trailing >
  995. # name and address
  996. ) (?: [\040\t] | \(
  997. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  998. \) )* # optional trailing comment
  999. /x
  1000. Alan Other <user\@dom.ain>
  1001. <user\@dom.ain>
  1002. user\@dom.ain
  1003. \"A. Other\" <user.1234\@dom.ain> (a comment)
  1004. A. Other <user.1234\@dom.ain> (a comment)
  1005. \"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"\@x400-re.lay
  1006. A missing angle <user\@some.where
  1007. *** Failers
  1008. The quick brown fox
  1009. /[\040\t]* # Nab whitespace.
  1010. (?:
  1011. \( # (
  1012. [^\\\x80-\xff\n\015()] * # normal*
  1013. (?: # (
  1014. (?: \\ [^\x80-\xff] |
  1015. \( # (
  1016. [^\\\x80-\xff\n\015()] * # normal*
  1017. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
  1018. \) # )
  1019. ) # special
  1020. [^\\\x80-\xff\n\015()] * # normal*
  1021. )* # )*
  1022. \) # )
  1023. [\040\t]* )* # If comment found, allow more spaces.
  1024. # optional leading comment
  1025. (?:
  1026. (?:
  1027. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  1028. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  1029. # Atom
  1030. | # or
  1031. " # "
  1032. [^\\\x80-\xff\n\015"] * # normal
  1033. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
  1034. " # "
  1035. # Quoted string
  1036. )
  1037. [\040\t]* # Nab whitespace.
  1038. (?:
  1039. \( # (
  1040. [^\\\x80-\xff\n\015()] * # normal*
  1041. (?: # (
  1042. (?: \\ [^\x80-\xff] |
  1043. \( # (
  1044. [^\\\x80-\xff\n\015()] * # normal*
  1045. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
  1046. \) # )
  1047. ) # special
  1048. [^\\\x80-\xff\n\015()] * # normal*
  1049. )* # )*
  1050. \) # )
  1051. [\040\t]* )* # If comment found, allow more spaces.
  1052. (?:
  1053. \.
  1054. [\040\t]* # Nab whitespace.
  1055. (?:
  1056. \( # (
  1057. [^\\\x80-\xff\n\015()] * # normal*
  1058. (?: # (
  1059. (?: \\ [^\x80-\xff] |
  1060. \( # (
  1061. [^\\\x80-\xff\n\015()] * # normal*
  1062. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
  1063. \) # )
  1064. ) # special
  1065. [^\\\x80-\xff\n\015()] * # normal*
  1066. )* # )*
  1067. \) # )
  1068. [\040\t]* )* # If comment found, allow more spaces.
  1069. (?:
  1070. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  1071. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  1072. # Atom
  1073. | # or
  1074. " # "
  1075. [^\\\x80-\xff\n\015"] * # normal
  1076. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
  1077. " # "
  1078. # Quoted string
  1079. )
  1080. [\040\t]* # Nab whitespace.
  1081. (?:
  1082. \( # (
  1083. [^\\\x80-\xff\n\015()] * # normal*
  1084. (?: # (
  1085. (?: \\ [^\x80-\xff] |
  1086. \( # (
  1087. [^\\\x80-\xff\n\015()] * # normal*
  1088. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
  1089. \) # )
  1090. ) # special
  1091. [^\\\x80-\xff\n\015()] * # normal*
  1092. )* # )*
  1093. \) # )
  1094. [\040\t]* )* # If comment found, allow more spaces.
  1095. # additional words
  1096. )*
  1097. @
  1098. [\040\t]* # Nab whitespace.
  1099. (?:
  1100. \( # (
  1101. [^\\\x80-\xff\n\015()] * # normal*
  1102. (?: # (
  1103. (?: \\ [^\x80-\xff] |
  1104. \( # (
  1105. [^\\\x80-\xff\n\015()] * # normal*
  1106. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
  1107. \) # )
  1108. ) # special
  1109. [^\\\x80-\xff\n\015()] * # normal*
  1110. )* # )*
  1111. \) # )
  1112. [\040\t]* )* # If comment found, allow more spaces.
  1113. (?:
  1114. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  1115. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  1116. |
  1117. \[ # [
  1118. (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
  1119. \] # ]
  1120. )
  1121. [\040\t]* # Nab whitespace.
  1122. (?:
  1123. \( # (
  1124. [^\\\x80-\xff\n\015()] * # normal*
  1125. (?: # (
  1126. (?: \\ [^\x80-\xff] |
  1127. \( # (
  1128. [^\\\x80-\xff\n\015()] * # normal*
  1129. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
  1130. \) # )
  1131. ) # special
  1132. [^\\\x80-\xff\n\015()] * # normal*
  1133. )* # )*
  1134. \) # )
  1135. [\040\t]* )* # If comment found, allow more spaces.
  1136. # optional trailing comments
  1137. (?:
  1138. \.
  1139. [\040\t]* # Nab whitespace.
  1140. (?:
  1141. \( # (
  1142. [^\\\x80-\xff\n\015()] * # normal*
  1143. (?: # (
  1144. (?: \\ [^\x80-\xff] |
  1145. \( # (
  1146. [^\\\x80-\xff\n\015()] * # normal*
  1147. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
  1148. \) # )
  1149. ) # special
  1150. [^\\\x80-\xff\n\015()] * # normal*
  1151. )* # )*
  1152. \) # )
  1153. [\040\t]* )* # If comment found, allow more spaces.
  1154. (?:
  1155. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  1156. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  1157. |
  1158. \[ # [
  1159. (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
  1160. \] # ]
  1161. )
  1162. [\040\t]* # Nab whitespace.
  1163. (?:
  1164. \( # (
  1165. [^\\\x80-\xff\n\015()] * # normal*
  1166. (?: # (
  1167. (?: \\ [^\x80-\xff] |
  1168. \( # (
  1169. [^\\\x80-\xff\n\015()] * # normal*
  1170. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
  1171. \) # )
  1172. ) # special
  1173. [^\\\x80-\xff\n\015()] * # normal*
  1174. )* # )*
  1175. \) # )
  1176. [\040\t]* )* # If comment found, allow more spaces.
  1177. # optional trailing comments
  1178. )*
  1179. # address
  1180. | # or
  1181. (?:
  1182. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  1183. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  1184. # Atom
  1185. | # or
  1186. " # "
  1187. [^\\\x80-\xff\n\015"] * # normal
  1188. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
  1189. " # "
  1190. # Quoted string
  1191. )
  1192. # leading word
  1193. [^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] * # "normal" atoms and or spaces
  1194. (?:
  1195. (?:
  1196. \( # (
  1197. [^\\\x80-\xff\n\015()] * # normal*
  1198. (?: # (
  1199. (?: \\ [^\x80-\xff] |
  1200. \( # (
  1201. [^\\\x80-\xff\n\015()] * # normal*
  1202. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
  1203. \) # )
  1204. ) # special
  1205. [^\\\x80-\xff\n\015()] * # normal*
  1206. )* # )*
  1207. \) # )
  1208. |
  1209. " # "
  1210. [^\\\x80-\xff\n\015"] * # normal
  1211. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
  1212. " # "
  1213. ) # "special" comment or quoted string
  1214. [^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] * # more "normal"
  1215. )*
  1216. <
  1217. [\040\t]* # Nab whitespace.
  1218. (?:
  1219. \( # (
  1220. [^\\\x80-\xff\n\015()] * # normal*
  1221. (?: # (
  1222. (?: \\ [^\x80-\xff] |
  1223. \( # (
  1224. [^\\\x80-\xff\n\015()] * # normal*
  1225. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
  1226. \) # )
  1227. ) # special
  1228. [^\\\x80-\xff\n\015()] * # normal*
  1229. )* # )*
  1230. \) # )
  1231. [\040\t]* )* # If comment found, allow more spaces.
  1232. # <
  1233. (?:
  1234. @
  1235. [\040\t]* # Nab whitespace.
  1236. (?:
  1237. \( # (
  1238. [^\\\x80-\xff\n\015()] * # normal*
  1239. (?: # (
  1240. (?: \\ [^\x80-\xff] |
  1241. \( # (
  1242. [^\\\x80-\xff\n\015()] * # normal*
  1243. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
  1244. \) # )
  1245. ) # special
  1246. [^\\\x80-\xff\n\015()] * # normal*
  1247. )* # )*
  1248. \) # )
  1249. [\040\t]* )* # If comment found, allow more spaces.
  1250. (?:
  1251. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  1252. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  1253. |
  1254. \[ # [
  1255. (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
  1256. \] # ]
  1257. )
  1258. [\040\t]* # Nab whitespace.
  1259. (?:
  1260. \( # (
  1261. [^\\\x80-\xff\n\015()] * # normal*
  1262. (?: # (
  1263. (?: \\ [^\x80-\xff] |
  1264. \( # (
  1265. [^\\\x80-\xff\n\015()] * # normal*
  1266. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
  1267. \) # )
  1268. ) # special
  1269. [^\\\x80-\xff\n\015()] * # normal*
  1270. )* # )*
  1271. \) # )
  1272. [\040\t]* )* # If comment found, allow more spaces.
  1273. # optional trailing comments
  1274. (?:
  1275. \.
  1276. [\040\t]* # Nab whitespace.
  1277. (?:
  1278. \( # (
  1279. [^\\\x80-\xff\n\015()] * # normal*
  1280. (?: # (
  1281. (?: \\ [^\x80-\xff] |
  1282. \( # (
  1283. [^\\\x80-\xff\n\015()] * # normal*
  1284. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
  1285. \) # )
  1286. ) # special
  1287. [^\\\x80-\xff\n\015()] * # normal*
  1288. )* # )*
  1289. \) # )
  1290. [\040\t]* )* # If comment found, allow more spaces.
  1291. (?:
  1292. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  1293. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  1294. |
  1295. \[ # [
  1296. (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
  1297. \] # ]
  1298. )
  1299. [\040\t]* # Nab whitespace.
  1300. (?:
  1301. \( # (
  1302. [^\\\x80-\xff\n\015()] * # normal*
  1303. (?: # (
  1304. (?: \\ [^\x80-\xff] |
  1305. \( # (
  1306. [^\\\x80-\xff\n\015()] * # normal*
  1307. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
  1308. \) # )
  1309. ) # special
  1310. [^\\\x80-\xff\n\015()] * # normal*
  1311. )* # )*
  1312. \) # )
  1313. [\040\t]* )* # If comment found, allow more spaces.
  1314. # optional trailing comments
  1315. )*
  1316. (?: ,
  1317. [\040\t]* # Nab whitespace.
  1318. (?:
  1319. \( # (
  1320. [^\\\x80-\xff\n\015()] * # normal*
  1321. (?: # (
  1322. (?: \\ [^\x80-\xff] |
  1323. \( # (
  1324. [^\\\x80-\xff\n\015()] * # normal*
  1325. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
  1326. \) # )
  1327. ) # special
  1328. [^\\\x80-\xff\n\015()] * # normal*
  1329. )* # )*
  1330. \) # )
  1331. [\040\t]* )* # If comment found, allow more spaces.
  1332. @
  1333. [\040\t]* # Nab whitespace.
  1334. (?:
  1335. \( # (
  1336. [^\\\x80-\xff\n\015()] * # normal*
  1337. (?: # (
  1338. (?: \\ [^\x80-\xff] |
  1339. \( # (
  1340. [^\\\x80-\xff\n\015()] * # normal*
  1341. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
  1342. \) # )
  1343. ) # special
  1344. [^\\\x80-\xff\n\015()] * # normal*
  1345. )* # )*
  1346. \) # )
  1347. [\040\t]* )* # If comment found, allow more spaces.
  1348. (?:
  1349. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  1350. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  1351. |
  1352. \[ # [
  1353. (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
  1354. \] # ]
  1355. )
  1356. [\040\t]* # Nab whitespace.
  1357. (?:
  1358. \( # (
  1359. [^\\\x80-\xff\n\015()] * # normal*
  1360. (?: # (
  1361. (?: \\ [^\x80-\xff] |
  1362. \( # (
  1363. [^\\\x80-\xff\n\015()] * # normal*
  1364. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
  1365. \) # )
  1366. ) # special
  1367. [^\\\x80-\xff\n\015()] * # normal*
  1368. )* # )*
  1369. \) # )
  1370. [\040\t]* )* # If comment found, allow more spaces.
  1371. # optional trailing comments
  1372. (?:
  1373. \.
  1374. [\040\t]* # Nab whitespace.
  1375. (?:
  1376. \( # (
  1377. [^\\\x80-\xff\n\015()] * # normal*
  1378. (?: # (
  1379. (?: \\ [^\x80-\xff] |
  1380. \( # (
  1381. [^\\\x80-\xff\n\015()] * # normal*
  1382. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
  1383. \) # )
  1384. ) # special
  1385. [^\\\x80-\xff\n\015()] * # normal*
  1386. )* # )*
  1387. \) # )
  1388. [\040\t]* )* # If comment found, allow more spaces.
  1389. (?:
  1390. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  1391. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  1392. |
  1393. \[ # [
  1394. (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
  1395. \] # ]
  1396. )
  1397. [\040\t]* # Nab whitespace.
  1398. (?:
  1399. \( # (
  1400. [^\\\x80-\xff\n\015()] * # normal*
  1401. (?: # (
  1402. (?: \\ [^\x80-\xff] |
  1403. \( # (
  1404. [^\\\x80-\xff\n\015()] * # normal*
  1405. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
  1406. \) # )
  1407. ) # special
  1408. [^\\\x80-\xff\n\015()] * # normal*
  1409. )* # )*
  1410. \) # )
  1411. [\040\t]* )* # If comment found, allow more spaces.
  1412. # optional trailing comments
  1413. )*
  1414. )* # additional domains
  1415. :
  1416. [\040\t]* # Nab whitespace.
  1417. (?:
  1418. \( # (
  1419. [^\\\x80-\xff\n\015()] * # normal*
  1420. (?: # (
  1421. (?: \\ [^\x80-\xff] |
  1422. \( # (
  1423. [^\\\x80-\xff\n\015()] * # normal*
  1424. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
  1425. \) # )
  1426. ) # special
  1427. [^\\\x80-\xff\n\015()] * # normal*
  1428. )* # )*
  1429. \) # )
  1430. [\040\t]* )* # If comment found, allow more spaces.
  1431. # optional trailing comments
  1432. )? # optional route
  1433. (?:
  1434. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  1435. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  1436. # Atom
  1437. | # or
  1438. " # "
  1439. [^\\\x80-\xff\n\015"] * # normal
  1440. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
  1441. " # "
  1442. # Quoted string
  1443. )
  1444. [\040\t]* # Nab whitespace.
  1445. (?:
  1446. \( # (
  1447. [^\\\x80-\xff\n\015()] * # normal*
  1448. (?: # (
  1449. (?: \\ [^\x80-\xff] |
  1450. \( # (
  1451. [^\\\x80-\xff\n\015()] * # normal*
  1452. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
  1453. \) # )
  1454. ) # special
  1455. [^\\\x80-\xff\n\015()] * # normal*
  1456. )* # )*
  1457. \) # )
  1458. [\040\t]* )* # If comment found, allow more spaces.
  1459. (?:
  1460. \.
  1461. [\040\t]* # Nab whitespace.
  1462. (?:
  1463. \( # (
  1464. [^\\\x80-\xff\n\015()] * # normal*
  1465. (?: # (
  1466. (?: \\ [^\x80-\xff] |
  1467. \( # (
  1468. [^\\\x80-\xff\n\015()] * # normal*
  1469. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
  1470. \) # )
  1471. ) # special
  1472. [^\\\x80-\xff\n\015()] * # normal*
  1473. )* # )*
  1474. \) # )
  1475. [\040\t]* )* # If comment found, allow more spaces.
  1476. (?:
  1477. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  1478. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  1479. # Atom
  1480. | # or
  1481. " # "
  1482. [^\\\x80-\xff\n\015"] * # normal
  1483. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
  1484. " # "
  1485. # Quoted string
  1486. )
  1487. [\040\t]* # Nab whitespace.
  1488. (?:
  1489. \( # (
  1490. [^\\\x80-\xff\n\015()] * # normal*
  1491. (?: # (
  1492. (?: \\ [^\x80-\xff] |
  1493. \( # (
  1494. [^\\\x80-\xff\n\015()] * # normal*
  1495. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
  1496. \) # )
  1497. ) # special
  1498. [^\\\x80-\xff\n\015()] * # normal*
  1499. )* # )*
  1500. \) # )
  1501. [\040\t]* )* # If comment found, allow more spaces.
  1502. # additional words
  1503. )*
  1504. @
  1505. [\040\t]* # Nab whitespace.
  1506. (?:
  1507. \( # (
  1508. [^\\\x80-\xff\n\015()] * # normal*
  1509. (?: # (
  1510. (?: \\ [^\x80-\xff] |
  1511. \( # (
  1512. [^\\\x80-\xff\n\015()] * # normal*
  1513. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
  1514. \) # )
  1515. ) # special
  1516. [^\\\x80-\xff\n\015()] * # normal*
  1517. )* # )*
  1518. \) # )
  1519. [\040\t]* )* # If comment found, allow more spaces.
  1520. (?:
  1521. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  1522. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  1523. |
  1524. \[ # [
  1525. (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
  1526. \] # ]
  1527. )
  1528. [\040\t]* # Nab whitespace.
  1529. (?:
  1530. \( # (
  1531. [^\\\x80-\xff\n\015()] * # normal*
  1532. (?: # (
  1533. (?: \\ [^\x80-\xff] |
  1534. \( # (
  1535. [^\\\x80-\xff\n\015()] * # normal*
  1536. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
  1537. \) # )
  1538. ) # special
  1539. [^\\\x80-\xff\n\015()] * # normal*
  1540. )* # )*
  1541. \) # )
  1542. [\040\t]* )* # If comment found, allow more spaces.
  1543. # optional trailing comments
  1544. (?:
  1545. \.
  1546. [\040\t]* # Nab whitespace.
  1547. (?:
  1548. \( # (
  1549. [^\\\x80-\xff\n\015()] * # normal*
  1550. (?: # (
  1551. (?: \\ [^\x80-\xff] |
  1552. \( # (
  1553. [^\\\x80-\xff\n\015()] * # normal*
  1554. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
  1555. \) # )
  1556. ) # special
  1557. [^\\\x80-\xff\n\015()] * # normal*
  1558. )* # )*
  1559. \) # )
  1560. [\040\t]* )* # If comment found, allow more spaces.
  1561. (?:
  1562. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  1563. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  1564. |
  1565. \[ # [
  1566. (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
  1567. \] # ]
  1568. )
  1569. [\040\t]* # Nab whitespace.
  1570. (?:
  1571. \( # (
  1572. [^\\\x80-\xff\n\015()] * # normal*
  1573. (?: # (
  1574. (?: \\ [^\x80-\xff] |
  1575. \( # (
  1576. [^\\\x80-\xff\n\015()] * # normal*
  1577. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
  1578. \) # )
  1579. ) # special
  1580. [^\\\x80-\xff\n\015()] * # normal*
  1581. )* # )*
  1582. \) # )
  1583. [\040\t]* )* # If comment found, allow more spaces.
  1584. # optional trailing comments
  1585. )*
  1586. # address spec
  1587. > # >
  1588. # name and address
  1589. )
  1590. /x
  1591. Alan Other <user\@dom.ain>
  1592. <user\@dom.ain>
  1593. user\@dom.ain
  1594. \"A. Other\" <user.1234\@dom.ain> (a comment)
  1595. A. Other <user.1234\@dom.ain> (a comment)
  1596. \"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"\@x400-re.lay
  1597. A missing angle <user\@some.where
  1598. *** Failers
  1599. The quick brown fox
  1600. /abc\0def\00pqr\000xyz\0000AB/
  1601. abc\0def\00pqr\000xyz\0000AB
  1602. abc456 abc\0def\00pqr\000xyz\0000ABCDE
  1603. /abc\x0def\x00pqr\x000xyz\x0000AB/
  1604. abc\x0def\x00pqr\x000xyz\x0000AB
  1605. abc456 abc\x0def\x00pqr\x000xyz\x0000ABCDE
  1606. /^[\000-\037]/
  1607. \0A
  1608. \01B
  1609. \037C
  1610. /\0*/
  1611. \0\0\0\0
  1612. /A\x0{2,3}Z/
  1613. The A\x0\x0Z
  1614. An A\0\x0\0Z
  1615. *** Failers
  1616. A\0Z
  1617. A\0\x0\0\x0Z
  1618. /^\s/
  1619. \040abc
  1620. \x0cabc
  1621. \nabc
  1622. \rabc
  1623. \tabc
  1624. *** Failers
  1625. abc
  1626. /^a b
  1627. c/x
  1628. abc
  1629. /ab{1,3}bc/
  1630. abbbbc
  1631. abbbc
  1632. abbc
  1633. *** Failers
  1634. abc
  1635. abbbbbc
  1636. /([^.]*)\.([^:]*):[T ]+(.*)/
  1637. track1.title:TBlah blah blah
  1638. /([^.]*)\.([^:]*):[T ]+(.*)/i
  1639. track1.title:TBlah blah blah
  1640. /([^.]*)\.([^:]*):[t ]+(.*)/i
  1641. track1.title:TBlah blah blah
  1642. /^[W-c]+$/
  1643. WXY_^abc
  1644. *** Failers
  1645. wxy
  1646. /^[W-c]+$/i
  1647. WXY_^abc
  1648. wxy_^ABC
  1649. /^[\x3f-\x5F]+$/i
  1650. WXY_^abc
  1651. wxy_^ABC
  1652. /^abc$/m
  1653. abc
  1654. qqq\nabc
  1655. abc\nzzz
  1656. qqq\nabc\nzzz
  1657. /^abc$/
  1658. abc
  1659. *** Failers
  1660. qqq\nabc
  1661. abc\nzzz
  1662. qqq\nabc\nzzz
  1663. /\Aabc\Z/m
  1664. abc
  1665. abc\n
  1666. *** Failers
  1667. qqq\nabc
  1668. abc\nzzz
  1669. qqq\nabc\nzzz
  1670. /\A(.)*\Z/s
  1671. abc\ndef
  1672. /\A(.)*\Z/m
  1673. *** Failers
  1674. abc\ndef
  1675. /(?:b)|(?::+)/
  1676. b::c
  1677. c::b
  1678. /[-az]+/
  1679. az-
  1680. *** Failers
  1681. b
  1682. /[az-]+/
  1683. za-
  1684. *** Failers
  1685. b
  1686. /[a\-z]+/
  1687. a-z
  1688. *** Failers
  1689. b
  1690. /[a-z]+/
  1691. abcdxyz
  1692. /[\d-]+/
  1693. 12-34
  1694. *** Failers
  1695. aaa
  1696. /[\d-z]+/
  1697. 12-34z
  1698. *** Failers
  1699. aaa
  1700. /\x5c/
  1701. \\
  1702. /\x20Z/
  1703. the Zoo
  1704. *** Failers
  1705. Zulu
  1706. /ab{3cd/
  1707. ab{3cd
  1708. /ab{3,cd/
  1709. ab{3,cd
  1710. /ab{3,4a}cd/
  1711. ab{3,4a}cd
  1712. /{4,5a}bc/
  1713. {4,5a}bc
  1714. /^a.b/<lf>
  1715. a\rb
  1716. *** Failers
  1717. a\nb
  1718. /abc$/
  1719. abc
  1720. abc\n
  1721. *** Failers
  1722. abc\ndef
  1723. /(abc)\123/
  1724. abc\x53
  1725. /(abc)\223/
  1726. abc\x93
  1727. /(abc)\323/
  1728. abc\xd3
  1729. /(abc)\100/
  1730. abc\x40
  1731. abc\100
  1732. /(abc)\1000/
  1733. abc\x400
  1734. abc\x40\x30
  1735. abc\1000
  1736. abc\100\x30
  1737. abc\100\060
  1738. abc\100\60
  1739. /^A\8B\9C$/
  1740. A8B9C
  1741. *** Failers
  1742. A\08B\09C
  1743. /^[A\8B\9C]+$/
  1744. A8B9C
  1745. *** Failers
  1746. A8B9C\x00
  1747. /(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\12\123/
  1748. abcdefghijk\12S
  1749. /ab\idef/
  1750. abidef
  1751. /a{0}bc/
  1752. bc
  1753. /(a|(bc)){0,0}?xyz/
  1754. xyz
  1755. /abc[\10]de/
  1756. abc\010de
  1757. /abc[\1]de/
  1758. abc\1de
  1759. /(abc)[\1]de/
  1760. abc\1de
  1761. /(?s)a.b/
  1762. a\nb
  1763. /^([^a])([^\b])([^c]*)([^d]{3,4})/
  1764. baNOTccccd
  1765. baNOTcccd
  1766. baNOTccd
  1767. bacccd
  1768. *** Failers
  1769. anything
  1770. b\bc
  1771. baccd
  1772. /[^a]/
  1773. Abc
  1774. /[^a]/i
  1775. Abc
  1776. /[^a]+/
  1777. AAAaAbc
  1778. /[^a]+/i
  1779. AAAaAbc
  1780. /[^a]+/
  1781. bbb\nccc
  1782. /[^k]$/
  1783. abc
  1784. *** Failers
  1785. abk
  1786. /[^k]{2,3}$/
  1787. abc
  1788. kbc
  1789. kabc
  1790. *** Failers
  1791. abk
  1792. akb
  1793. akk
  1794. /^\d{8,}\@.+[^k]$/
  1795. 12345678\@a.b.c.d
  1796. 123456789\@x.y.z
  1797. *** Failers
  1798. 12345678\@x.y.uk
  1799. 1234567\@a.b.c.d
  1800. /[^a]/
  1801. aaaabcd
  1802. aaAabcd
  1803. /[^a]/i
  1804. aaaabcd
  1805. aaAabcd
  1806. /[^az]/
  1807. aaaabcd
  1808. aaAabcd
  1809. /[^az]/i
  1810. aaaabcd
  1811. aaAabcd
  1812. /\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/
  1813. \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
  1814. /P[^*]TAIRE[^*]{1,6}?LL/
  1815. xxxxxxxxxxxPSTAIREISLLxxxxxxxxx
  1816. /P[^*]TAIRE[^*]{1,}?LL/
  1817. xxxxxxxxxxxPSTAIREISLLxxxxxxxxx
  1818. /(\.\d\d[1-9]?)\d+/
  1819. 1.230003938
  1820. 1.875000282
  1821. 1.235
  1822. /(\.\d\d((?=0)|\d(?=\d)))/
  1823. 1.230003938
  1824. 1.875000282
  1825. *** Failers
  1826. 1.235
  1827. /a(?)b/
  1828. ab
  1829. /\b(foo)\s+(\w+)/i
  1830. Food is on the foo table
  1831. /foo(.*)bar/
  1832. The food is under the bar in the barn.
  1833. /foo(.*?)bar/
  1834. The food is under the bar in the barn.
  1835. /(.*)(\d*)/O
  1836. I have 2 numbers: 53147
  1837. /(.*)(\d+)/
  1838. I have 2 numbers: 53147
  1839. /(.*?)(\d*)/O
  1840. I have 2 numbers: 53147
  1841. /(.*?)(\d+)/
  1842. I have 2 numbers: 53147
  1843. /(.*)(\d+)$/
  1844. I have 2 numbers: 53147
  1845. /(.*?)(\d+)$/
  1846. I have 2 numbers: 53147
  1847. /(.*)\b(\d+)$/
  1848. I have 2 numbers: 53147
  1849. /(.*\D)(\d+)$/
  1850. I have 2 numbers: 53147
  1851. /^\D*(?!123)/
  1852. ABC123
  1853. /^(\D*)(?=\d)(?!123)/
  1854. ABC445
  1855. *** Failers
  1856. ABC123
  1857. /^[W-]46]/
  1858. W46]789
  1859. -46]789
  1860. *** Failers
  1861. Wall
  1862. Zebra
  1863. 42
  1864. [abcd]
  1865. ]abcd[
  1866. /^[W-\]46]/
  1867. W46]789
  1868. Wall
  1869. Zebra
  1870. Xylophone
  1871. 42
  1872. [abcd]
  1873. ]abcd[
  1874. \\backslash
  1875. *** Failers
  1876. -46]789
  1877. well
  1878. /\d\d\/\d\d\/\d\d\d\d/
  1879. 01/01/2000
  1880. /word (?:[a-zA-Z0-9]+ ){0,10}otherword/
  1881. word cat dog elephant mussel cow horse canary baboon snake shark otherword
  1882. word cat dog elephant mussel cow horse canary baboon snake shark
  1883. /word (?:[a-zA-Z0-9]+ ){0,300}otherword/
  1884. 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
  1885. /^(a){0,0}/
  1886. bcd
  1887. abc
  1888. aab
  1889. /^(a){0,1}/
  1890. bcd
  1891. abc
  1892. aab
  1893. /^(a){0,2}/
  1894. bcd
  1895. abc
  1896. aab
  1897. /^(a){0,3}/
  1898. bcd
  1899. abc
  1900. aab
  1901. aaa
  1902. /^(a){0,}/
  1903. bcd
  1904. abc
  1905. aab
  1906. aaa
  1907. aaaaaaaa
  1908. /^(a){1,1}/
  1909. bcd
  1910. abc
  1911. aab
  1912. /^(a){1,2}/
  1913. bcd
  1914. abc
  1915. aab
  1916. /^(a){1,3}/
  1917. bcd
  1918. abc
  1919. aab
  1920. aaa
  1921. /^(a){1,}/
  1922. bcd
  1923. abc
  1924. aab
  1925. aaa
  1926. aaaaaaaa
  1927. /.*\.gif/
  1928. borfle\nbib.gif\nno
  1929. /.{0,}\.gif/
  1930. borfle\nbib.gif\nno
  1931. /.*\.gif/m
  1932. borfle\nbib.gif\nno
  1933. /.*\.gif/s
  1934. borfle\nbib.gif\nno
  1935. /.*\.gif/ms
  1936. borfle\nbib.gif\nno
  1937. /.*$/
  1938. borfle\nbib.gif\nno
  1939. /.*$/m
  1940. borfle\nbib.gif\nno
  1941. /.*$/s
  1942. borfle\nbib.gif\nno
  1943. /.*$/ms
  1944. borfle\nbib.gif\nno
  1945. /.*$/
  1946. borfle\nbib.gif\nno\n
  1947. /.*$/m
  1948. borfle\nbib.gif\nno\n
  1949. /.*$/s
  1950. borfle\nbib.gif\nno\n
  1951. /.*$/ms
  1952. borfle\nbib.gif\nno\n
  1953. /(.*X|^B)/
  1954. abcde\n1234Xyz
  1955. BarFoo
  1956. *** Failers
  1957. abcde\nBar
  1958. /(.*X|^B)/m
  1959. abcde\n1234Xyz
  1960. BarFoo
  1961. abcde\nBar
  1962. /(.*X|^B)/s
  1963. abcde\n1234Xyz
  1964. BarFoo
  1965. *** Failers
  1966. abcde\nBar
  1967. /(.*X|^B)/ms
  1968. abcde\n1234Xyz
  1969. BarFoo
  1970. abcde\nBar
  1971. /(?s)(.*X|^B)/
  1972. abcde\n1234Xyz
  1973. BarFoo
  1974. *** Failers
  1975. abcde\nBar
  1976. /(?s:.*X|^B)/
  1977. abcde\n1234Xyz
  1978. BarFoo
  1979. *** Failers
  1980. abcde\nBar
  1981. /^.*B/
  1982. **** Failers
  1983. abc\nB
  1984. /(?s)^.*B/
  1985. abc\nB
  1986. /(?m)^.*B/
  1987. abc\nB
  1988. /(?ms)^.*B/
  1989. abc\nB
  1990. /(?ms)^B/
  1991. abc\nB
  1992. /(?s)B$/
  1993. B\n
  1994. /^[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/
  1995. 123456654321
  1996. /^\d\d\d\d\d\d\d\d\d\d\d\d/
  1997. 123456654321
  1998. /^[\d][\d][\d][\d][\d][\d][\d][\d][\d][\d][\d][\d]/
  1999. 123456654321
  2000. /^[abc]{12}/
  2001. abcabcabcabc
  2002. /^[a-c]{12}/
  2003. abcabcabcabc
  2004. /^(a|b|c){12}/
  2005. abcabcabcabc
  2006. /^[abcdefghijklmnopqrstuvwxy0123456789]/
  2007. n
  2008. *** Failers
  2009. z
  2010. /abcde{0,0}/
  2011. abcd
  2012. *** Failers
  2013. abce
  2014. /ab[cd]{0,0}e/
  2015. abe
  2016. *** Failers
  2017. abcde
  2018. /ab(c){0,0}d/
  2019. abd
  2020. *** Failers
  2021. abcd
  2022. /a(b*)/
  2023. a
  2024. ab
  2025. abbbb
  2026. *** Failers
  2027. bbbbb
  2028. /ab\d{0}e/
  2029. abe
  2030. *** Failers
  2031. ab1e
  2032. /"([^\\"]+|\\.)*"/
  2033. the \"quick\" brown fox
  2034. \"the \\\"quick\\\" brown fox\"
  2035. /.*?/g+
  2036. abc
  2037. /\b/g+
  2038. abc
  2039. /\b/+g
  2040. abc
  2041. //g
  2042. abc
  2043. /<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
  2044. <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>
  2045. /a[^a]b/
  2046. acb
  2047. a\nb
  2048. /a.b/
  2049. acb
  2050. *** Failers
  2051. a\nb
  2052. /a[^a]b/s
  2053. acb
  2054. a\nb
  2055. /a.b/s
  2056. acb
  2057. a\nb
  2058. /^(b+?|a){1,2}?c/
  2059. bac
  2060. bbac
  2061. bbbac
  2062. bbbbac
  2063. bbbbbac
  2064. /^(b+|a){1,2}?c/
  2065. bac
  2066. bbac
  2067. bbbac
  2068. bbbbac
  2069. bbbbbac
  2070. /(?!\A)x/m
  2071. x\nb\n
  2072. a\bx\n
  2073. /\x0{ab}/
  2074. \0{ab}
  2075. /(A|B)*?CD/
  2076. CD
  2077. /(A|B)*CD/
  2078. CD
  2079. /(?<!bar)foo/
  2080. foo
  2081. catfood
  2082. arfootle
  2083. rfoosh
  2084. *** Failers
  2085. barfoo
  2086. towbarfoo
  2087. /\w{3}(?<!bar)foo/
  2088. catfood
  2089. *** Failers
  2090. foo
  2091. barfoo
  2092. towbarfoo
  2093. /(?<=(foo)a)bar/
  2094. fooabar
  2095. *** Failers
  2096. bar
  2097. foobbar
  2098. /\Aabc\z/m
  2099. abc
  2100. *** Failers
  2101. abc\n
  2102. qqq\nabc
  2103. abc\nzzz
  2104. qqq\nabc\nzzz
  2105. "(?>.*/)foo"
  2106. /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/it/you/see/
  2107. "(?>.*/)foo"
  2108. /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo
  2109. /(?>(\.\d\d[1-9]?))\d+/
  2110. 1.230003938
  2111. 1.875000282
  2112. *** Failers
  2113. 1.235
  2114. /^((?>\w+)|(?>\s+))*$/
  2115. now is the time for all good men to come to the aid of the party
  2116. *** Failers
  2117. this is not a line with only words and spaces!
  2118. /(\d+)(\w)/
  2119. 12345a
  2120. 12345+
  2121. /((?>\d+))(\w)/
  2122. 12345a
  2123. *** Failers
  2124. 12345+
  2125. /(?>a+)b/
  2126. aaab
  2127. /((?>a+)b)/
  2128. aaab
  2129. /(?>(a+))b/
  2130. aaab
  2131. /(?>b)+/
  2132. aaabbbccc
  2133. /(?>a+|b+|c+)*c/
  2134. aaabbbbccccd
  2135. /(a+|b+|c+)*c/
  2136. aaabbbbccccd
  2137. /((?>[^()]+)|\([^()]*\))+/
  2138. ((abc(ade)ufh()()x
  2139. /\(((?>[^()]+)|\([^()]+\))+\)/
  2140. (abc)
  2141. (abc(def)xyz)
  2142. *** Failers
  2143. ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  2144. /a(?-i)b/i
  2145. ab
  2146. Ab
  2147. *** Failers
  2148. aB
  2149. AB
  2150. /(a (?x)b c)d e/
  2151. a bcd e
  2152. *** Failers
  2153. a b cd e
  2154. abcd e
  2155. a bcde
  2156. /(a b(?x)c d (?-x)e f)/
  2157. a bcde f
  2158. *** Failers
  2159. abcdef
  2160. /(a(?i)b)c/
  2161. abc
  2162. aBc
  2163. *** Failers
  2164. abC
  2165. aBC
  2166. Abc
  2167. ABc
  2168. ABC
  2169. AbC
  2170. /a(?i:b)c/
  2171. abc
  2172. aBc
  2173. *** Failers
  2174. ABC
  2175. abC
  2176. aBC
  2177. /a(?i:b)*c/
  2178. aBc
  2179. aBBc
  2180. *** Failers
  2181. aBC
  2182. aBBC
  2183. /a(?=b(?i)c)\w\wd/
  2184. abcd
  2185. abCd
  2186. *** Failers
  2187. aBCd
  2188. abcD
  2189. /(?s-i:more.*than).*million/i
  2190. more than million
  2191. more than MILLION
  2192. more \n than Million
  2193. *** Failers
  2194. MORE THAN MILLION
  2195. more \n than \n million
  2196. /(?:(?s-i)more.*than).*million/i
  2197. more than million
  2198. more than MILLION
  2199. more \n than Million
  2200. *** Failers
  2201. MORE THAN MILLION
  2202. more \n than \n million
  2203. /(?>a(?i)b+)+c/
  2204. abc
  2205. aBbc
  2206. aBBc
  2207. *** Failers
  2208. Abc
  2209. abAb
  2210. abbC
  2211. /(?=a(?i)b)\w\wc/
  2212. abc
  2213. aBc
  2214. *** Failers
  2215. Ab
  2216. abC
  2217. aBC
  2218. /(?<=a(?i)b)(\w\w)c/
  2219. abxxc
  2220. aBxxc
  2221. *** Failers
  2222. Abxxc
  2223. ABxxc
  2224. abxxC
  2225. /^(?(?=abc)\w{3}:|\d\d)$/
  2226. abc:
  2227. 12
  2228. *** Failers
  2229. 123
  2230. xyz
  2231. /^(?(?!abc)\d\d|\w{3}:)$/
  2232. abc:
  2233. 12
  2234. *** Failers
  2235. 123
  2236. xyz
  2237. /(?(?<=foo)bar|cat)/
  2238. foobar
  2239. cat
  2240. fcat
  2241. focat
  2242. *** Failers
  2243. foocat
  2244. /(?(?<!foo)cat|bar)/
  2245. foobar
  2246. cat
  2247. fcat
  2248. focat
  2249. *** Failers
  2250. foocat
  2251. /(?>a*)*/
  2252. a
  2253. aa
  2254. aaaa
  2255. /(abc|)+/
  2256. abc
  2257. abcabc
  2258. abcabcabc
  2259. xyz
  2260. /([a]*)*/
  2261. a
  2262. aaaaa
  2263. /([ab]*)*/
  2264. a
  2265. b
  2266. ababab
  2267. aaaabcde
  2268. bbbb
  2269. /([^a]*)*/
  2270. b
  2271. bbbb
  2272. aaa
  2273. /([^ab]*)*/
  2274. cccc
  2275. abab
  2276. /([a]*?)*/
  2277. a
  2278. aaaa
  2279. /([ab]*?)*/
  2280. a
  2281. b
  2282. abab
  2283. baba
  2284. /([^a]*?)*/
  2285. b
  2286. bbbb
  2287. aaa
  2288. /([^ab]*?)*/
  2289. c
  2290. cccc
  2291. baba
  2292. /(?>a*)*/
  2293. a
  2294. aaabcde
  2295. /((?>a*))*/
  2296. aaaaa
  2297. aabbaa
  2298. /((?>a*?))*/
  2299. aaaaa
  2300. aabbaa
  2301. /(?(?=[^a-z]+[a-z]) \d{2}-[a-z]{3}-\d{2} | \d{2}-\d{2}-\d{2} ) /x
  2302. 12-sep-98
  2303. 12-09-98
  2304. *** Failers
  2305. sep-12-98
  2306. /(?i:saturday|sunday)/
  2307. saturday
  2308. sunday
  2309. Saturday
  2310. Sunday
  2311. SATURDAY
  2312. SUNDAY
  2313. SunDay
  2314. /(a(?i)bc|BB)x/
  2315. abcx
  2316. aBCx
  2317. bbx
  2318. BBx
  2319. *** Failers
  2320. abcX
  2321. aBCX
  2322. bbX
  2323. BBX
  2324. /^([ab](?i)[cd]|[ef])/
  2325. ac
  2326. aC
  2327. bD
  2328. elephant
  2329. Europe
  2330. frog
  2331. France
  2332. *** Failers
  2333. Africa
  2334. /^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)/
  2335. ab
  2336. aBd
  2337. xy
  2338. xY
  2339. zebra
  2340. Zambesi
  2341. *** Failers
  2342. aCD
  2343. XY
  2344. /(?<=foo\n)^bar/m
  2345. foo\nbar
  2346. *** Failers
  2347. bar
  2348. baz\nbar
  2349. /(?<=(?<!foo)bar)baz/
  2350. barbaz
  2351. barbarbaz
  2352. koobarbaz
  2353. *** Failers
  2354. baz
  2355. foobarbaz
  2356. /The following tests are taken from the Perl 5.005 test suite; some of them/
  2357. /are compatible with 5.004, but I'd rather not have to sort them out./
  2358. /abc/
  2359. abc
  2360. xabcy
  2361. ababc
  2362. *** Failers
  2363. xbc
  2364. axc
  2365. abx
  2366. /ab*c/
  2367. abc
  2368. /ab*bc/
  2369. abc
  2370. abbc
  2371. abbbbc
  2372. /.{1}/
  2373. abbbbc
  2374. /.{3,4}/
  2375. abbbbc
  2376. /ab{0,}bc/
  2377. abbbbc
  2378. /ab+bc/
  2379. abbc
  2380. *** Failers
  2381. abc
  2382. abq
  2383. /ab+bc/
  2384. abbbbc
  2385. /ab{1,}bc/
  2386. abbbbc
  2387. /ab{1,3}bc/
  2388. abbbbc
  2389. /ab{3,4}bc/
  2390. abbbbc
  2391. /ab{4,5}bc/
  2392. *** Failers
  2393. abq
  2394. abbbbc
  2395. /ab?bc/
  2396. abbc
  2397. abc
  2398. /ab{0,1}bc/
  2399. abc
  2400. /ab?bc/
  2401. /ab?c/
  2402. abc
  2403. /ab{0,1}c/
  2404. abc
  2405. /^abc$/
  2406. abc
  2407. *** Failers
  2408. abbbbc
  2409. abcc
  2410. /^abc/
  2411. abcc
  2412. /^abc$/
  2413. /abc$/
  2414. aabc
  2415. *** Failers
  2416. aabc
  2417. aabcd
  2418. /^/
  2419. abc
  2420. /$/
  2421. abc
  2422. /a.c/
  2423. abc
  2424. axc
  2425. /a.*c/
  2426. axyzc
  2427. /a[bc]d/
  2428. abd
  2429. *** Failers
  2430. axyzd
  2431. abc
  2432. /a[b-d]e/
  2433. ace
  2434. /a[b-d]/
  2435. aac
  2436. /a[-b]/
  2437. a-
  2438. /a[b-]/
  2439. a-
  2440. /a]/
  2441. a]
  2442. /a[]]b/
  2443. a]b
  2444. /a[^bc]d/
  2445. aed
  2446. *** Failers
  2447. abd
  2448. abd
  2449. /a[^-b]c/
  2450. adc
  2451. /a[^]b]c/
  2452. adc
  2453. *** Failers
  2454. a-c
  2455. a]c
  2456. /\ba\b/
  2457. a-
  2458. -a
  2459. -a-
  2460. /\by\b/
  2461. *** Failers
  2462. xy
  2463. yz
  2464. xyz
  2465. /\Ba\B/
  2466. *** Failers
  2467. a-
  2468. -a
  2469. -a-
  2470. /\By\b/
  2471. xy
  2472. /\by\B/
  2473. yz
  2474. /\By\B/
  2475. xyz
  2476. /\w/
  2477. a
  2478. /\W/
  2479. -
  2480. *** Failers
  2481. -
  2482. a
  2483. /a\sb/
  2484. a b
  2485. /a\Sb/
  2486. a-b
  2487. *** Failers
  2488. a-b
  2489. a b
  2490. /\d/
  2491. 1
  2492. /\D/
  2493. -
  2494. *** Failers
  2495. -
  2496. 1
  2497. /[\w]/
  2498. a
  2499. /[\W]/
  2500. -
  2501. *** Failers
  2502. -
  2503. a
  2504. /a[\s]b/
  2505. a b
  2506. /a[\S]b/
  2507. a-b
  2508. *** Failers
  2509. a-b
  2510. a b
  2511. /[\d]/
  2512. 1
  2513. /[\D]/
  2514. -
  2515. *** Failers
  2516. -
  2517. 1
  2518. /ab|cd/
  2519. abc
  2520. abcd
  2521. /()ef/
  2522. def
  2523. /$b/
  2524. /a\(b/
  2525. a(b
  2526. /a\(*b/
  2527. ab
  2528. a((b
  2529. /a\\b/
  2530. a\b
  2531. /((a))/
  2532. abc
  2533. /(a)b(c)/
  2534. abc
  2535. /a+b+c/
  2536. aabbabc
  2537. /a{1,}b{1,}c/
  2538. aabbabc
  2539. /a.+?c/
  2540. abcabc
  2541. /(a+|b)*/
  2542. ab
  2543. /(a+|b){0,}/
  2544. ab
  2545. /(a+|b)+/
  2546. ab
  2547. /(a+|b){1,}/
  2548. ab
  2549. /(a+|b)?/
  2550. ab
  2551. /(a+|b){0,1}/
  2552. ab
  2553. /[^ab]*/
  2554. cde
  2555. /abc/
  2556. *** Failers
  2557. b
  2558. /a*/
  2559. /([abc])*d/
  2560. abbbcd
  2561. /([abc])*bcd/
  2562. abcd
  2563. /a|b|c|d|e/
  2564. e
  2565. /(a|b|c|d|e)f/
  2566. ef
  2567. /abcd*efg/
  2568. abcdefg
  2569. /ab*/
  2570. xabyabbbz
  2571. xayabbbz
  2572. /(ab|cd)e/
  2573. abcde
  2574. /[abhgefdc]ij/
  2575. hij
  2576. /^(ab|cd)e/
  2577. /(abc|)ef/
  2578. abcdef
  2579. /(a|b)c*d/
  2580. abcd
  2581. /(ab|ab*)bc/
  2582. abc
  2583. /a([bc]*)c*/
  2584. abc
  2585. /a([bc]*)(c*d)/
  2586. abcd
  2587. /a([bc]+)(c*d)/
  2588. abcd
  2589. /a([bc]*)(c+d)/
  2590. abcd
  2591. /a[bcd]*dcdcde/
  2592. adcdcde
  2593. /a[bcd]+dcdcde/
  2594. *** Failers
  2595. abcde
  2596. adcdcde
  2597. /(ab|a)b*c/
  2598. abc
  2599. /((a)(b)c)(d)/
  2600. abcd
  2601. /[a-zA-Z_][a-zA-Z0-9_]*/
  2602. alpha
  2603. /^a(bc+|b[eh])g|.h$/
  2604. abh
  2605. /(bc+d$|ef*g.|h?i(j|k))/
  2606. effgz
  2607. ij
  2608. reffgz
  2609. *** Failers
  2610. effg
  2611. bcdd
  2612. /((((((((((a))))))))))/
  2613. a
  2614. /(((((((((a)))))))))/
  2615. a
  2616. /multiple words of text/
  2617. *** Failers
  2618. aa
  2619. uh-uh
  2620. /multiple words/
  2621. multiple words, yeah
  2622. /(.*)c(.*)/
  2623. abcde
  2624. /\((.*), (.*)\)/
  2625. (a, b)
  2626. /[k]/
  2627. /abcd/
  2628. abcd
  2629. /a(bc)d/
  2630. abcd
  2631. /a[-]?c/
  2632. ac
  2633. /abc/i
  2634. ABC
  2635. XABCY
  2636. ABABC
  2637. *** Failers
  2638. aaxabxbaxbbx
  2639. XBC
  2640. AXC
  2641. ABX
  2642. /ab*c/i
  2643. ABC
  2644. /ab*bc/i
  2645. ABC
  2646. ABBC
  2647. /ab*?bc/i
  2648. ABBBBC
  2649. /ab{0,}?bc/i
  2650. ABBBBC
  2651. /ab+?bc/i
  2652. ABBC
  2653. /ab+bc/i
  2654. *** Failers
  2655. ABC
  2656. ABQ
  2657. /ab{1,}bc/i
  2658. /ab+bc/i
  2659. ABBBBC
  2660. /ab{1,}?bc/i
  2661. ABBBBC
  2662. /ab{1,3}?bc/i
  2663. ABBBBC
  2664. /ab{3,4}?bc/i
  2665. ABBBBC
  2666. /ab{4,5}?bc/i
  2667. *** Failers
  2668. ABQ
  2669. ABBBBC
  2670. /ab??bc/i
  2671. ABBC
  2672. ABC
  2673. /ab{0,1}?bc/i
  2674. ABC
  2675. /ab??bc/i
  2676. /ab??c/i
  2677. ABC
  2678. /ab{0,1}?c/i
  2679. ABC
  2680. /^abc$/i
  2681. ABC
  2682. *** Failers
  2683. ABBBBC
  2684. ABCC
  2685. /^abc/i
  2686. ABCC
  2687. /^abc$/i
  2688. /abc$/i
  2689. AABC
  2690. /^/i
  2691. ABC
  2692. /$/i
  2693. ABC
  2694. /a.c/i
  2695. ABC
  2696. AXC
  2697. /a.*?c/i
  2698. AXYZC
  2699. /a.*c/i
  2700. *** Failers
  2701. AABC
  2702. AXYZD
  2703. /a[bc]d/i
  2704. ABD
  2705. /a[b-d]e/i
  2706. ACE
  2707. *** Failers
  2708. ABC
  2709. ABD
  2710. /a[b-d]/i
  2711. AAC
  2712. /a[-b]/i
  2713. A-
  2714. /a[b-]/i
  2715. A-
  2716. /a]/i
  2717. A]
  2718. /a[]]b/i
  2719. A]B
  2720. /a[^bc]d/i
  2721. AED
  2722. /a[^-b]c/i
  2723. ADC
  2724. *** Failers
  2725. ABD
  2726. A-C
  2727. /a[^]b]c/i
  2728. ADC
  2729. /ab|cd/i
  2730. ABC
  2731. ABCD
  2732. /()ef/i
  2733. DEF
  2734. /$b/i
  2735. *** Failers
  2736. A]C
  2737. B
  2738. /a\(b/i
  2739. A(B
  2740. /a\(*b/i
  2741. AB
  2742. A((B
  2743. /a\\b/i
  2744. A\B
  2745. /((a))/i
  2746. ABC
  2747. /(a)b(c)/i
  2748. ABC
  2749. /a+b+c/i
  2750. AABBABC
  2751. /a{1,}b{1,}c/i
  2752. AABBABC
  2753. /a.+?c/i
  2754. ABCABC
  2755. /a.*?c/i
  2756. ABCABC
  2757. /a.{0,5}?c/i
  2758. ABCABC
  2759. /(a+|b)*/i
  2760. AB
  2761. /(a+|b){0,}/i
  2762. AB
  2763. /(a+|b)+/i
  2764. AB
  2765. /(a+|b){1,}/i
  2766. AB
  2767. /(a+|b)?/i
  2768. AB
  2769. /(a+|b){0,1}/i
  2770. AB
  2771. /(a+|b){0,1}?/i
  2772. AB
  2773. /[^ab]*/i
  2774. CDE
  2775. /abc/i
  2776. /a*/i
  2777. /([abc])*d/i
  2778. ABBBCD
  2779. /([abc])*bcd/i
  2780. ABCD
  2781. /a|b|c|d|e/i
  2782. E
  2783. /(a|b|c|d|e)f/i
  2784. EF
  2785. /abcd*efg/i
  2786. ABCDEFG
  2787. /ab*/i
  2788. XABYABBBZ
  2789. XAYABBBZ
  2790. /(ab|cd)e/i
  2791. ABCDE
  2792. /[abhgefdc]ij/i
  2793. HIJ
  2794. /^(ab|cd)e/i
  2795. ABCDE
  2796. /(abc|)ef/i
  2797. ABCDEF
  2798. /(a|b)c*d/i
  2799. ABCD
  2800. /(ab|ab*)bc/i
  2801. ABC
  2802. /a([bc]*)c*/i
  2803. ABC
  2804. /a([bc]*)(c*d)/i
  2805. ABCD
  2806. /a([bc]+)(c*d)/i
  2807. ABCD
  2808. /a([bc]*)(c+d)/i
  2809. ABCD
  2810. /a[bcd]*dcdcde/i
  2811. ADCDCDE
  2812. /a[bcd]+dcdcde/i
  2813. /(ab|a)b*c/i
  2814. ABC
  2815. /((a)(b)c)(d)/i
  2816. ABCD
  2817. /[a-zA-Z_][a-zA-Z0-9_]*/i
  2818. ALPHA
  2819. /^a(bc+|b[eh])g|.h$/i
  2820. ABH
  2821. /(bc+d$|ef*g.|h?i(j|k))/i
  2822. EFFGZ
  2823. IJ
  2824. REFFGZ
  2825. *** Failers
  2826. ADCDCDE
  2827. EFFG
  2828. BCDD
  2829. /((((((((((a))))))))))/i
  2830. A
  2831. /(((((((((a)))))))))/i
  2832. A
  2833. /(?:(?:(?:(?:(?:(?:(?:(?:(?:(a))))))))))/i
  2834. A
  2835. /(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))/i
  2836. C
  2837. /multiple words of text/i
  2838. *** Failers
  2839. AA
  2840. UH-UH
  2841. /multiple words/i
  2842. MULTIPLE WORDS, YEAH
  2843. /(.*)c(.*)/i
  2844. ABCDE
  2845. /\((.*), (.*)\)/i
  2846. (A, B)
  2847. /[k]/i
  2848. /abcd/i
  2849. ABCD
  2850. /a(bc)d/i
  2851. ABCD
  2852. /a[-]?c/i
  2853. AC
  2854. /a(?!b)./
  2855. abad
  2856. /a(?=d)./
  2857. abad
  2858. /a(?=c|d)./
  2859. abad
  2860. /a(?:b|c|d)(.)/
  2861. ace
  2862. /a(?:b|c|d)*(.)/
  2863. ace
  2864. /a(?:b|c|d)+?(.)/
  2865. ace
  2866. acdbcdbe
  2867. /a(?:b|c|d)+(.)/
  2868. acdbcdbe
  2869. /a(?:b|c|d){2}(.)/
  2870. acdbcdbe
  2871. /a(?:b|c|d){4,5}(.)/
  2872. acdbcdbe
  2873. /a(?:b|c|d){4,5}?(.)/
  2874. acdbcdbe
  2875. /((foo)|(bar))*/
  2876. foobar
  2877. /a(?:b|c|d){6,7}(.)/
  2878. acdbcdbe
  2879. /a(?:b|c|d){6,7}?(.)/
  2880. acdbcdbe
  2881. /a(?:b|c|d){5,6}(.)/
  2882. acdbcdbe
  2883. /a(?:b|c|d){5,6}?(.)/
  2884. acdbcdbe
  2885. /a(?:b|c|d){5,7}(.)/
  2886. acdbcdbe
  2887. /a(?:b|c|d){5,7}?(.)/
  2888. acdbcdbe
  2889. /a(?:b|(c|e){1,2}?|d)+?(.)/
  2890. ace
  2891. /^(.+)?B/
  2892. AB
  2893. /^([^a-z])|(\^)$/
  2894. .
  2895. /^[<>]&/
  2896. <&OUT
  2897. /(?:(f)(o)(o)|(b)(a)(r))*/
  2898. foobar
  2899. /(?<=a)b/
  2900. ab
  2901. *** Failers
  2902. cb
  2903. b
  2904. /(?<!c)b/
  2905. ab
  2906. b
  2907. b
  2908. /(?:..)*a/
  2909. aba
  2910. /(?:..)*?a/
  2911. aba
  2912. /^(){3,5}/
  2913. abc
  2914. /^(a+)*ax/
  2915. aax
  2916. /^((a|b)+)*ax/
  2917. aax
  2918. /^((a|bc)+)*ax/
  2919. aax
  2920. /(a|x)*ab/
  2921. cab
  2922. /(a)*ab/
  2923. cab
  2924. /(?:(?i)a)b/
  2925. ab
  2926. /((?i)a)b/
  2927. ab
  2928. /(?:(?i)a)b/
  2929. Ab
  2930. /((?i)a)b/
  2931. Ab
  2932. /(?:(?i)a)b/
  2933. *** Failers
  2934. cb
  2935. aB
  2936. /((?i)a)b/
  2937. /(?i:a)b/
  2938. ab
  2939. /((?i:a))b/
  2940. ab
  2941. /(?i:a)b/
  2942. Ab
  2943. /((?i:a))b/
  2944. Ab
  2945. /(?i:a)b/
  2946. *** Failers
  2947. aB
  2948. aB
  2949. /((?i:a))b/
  2950. /(?:(?-i)a)b/i
  2951. ab
  2952. /((?-i)a)b/i
  2953. ab
  2954. /(?:(?-i)a)b/i
  2955. aB
  2956. /((?-i)a)b/i
  2957. aB
  2958. /(?:(?-i)a)b/i
  2959. *** Failers
  2960. aB
  2961. Ab
  2962. /((?-i)a)b/i
  2963. /(?:(?-i)a)b/i
  2964. aB
  2965. /((?-i)a)b/i
  2966. aB
  2967. /(?:(?-i)a)b/i
  2968. *** Failers
  2969. Ab
  2970. AB
  2971. /((?-i)a)b/i
  2972. /(?-i:a)b/i
  2973. ab
  2974. /((?-i:a))b/i
  2975. ab
  2976. /(?-i:a)b/i
  2977. aB
  2978. /((?-i:a))b/i
  2979. aB
  2980. /(?-i:a)b/i
  2981. *** Failers
  2982. AB
  2983. Ab
  2984. /((?-i:a))b/i
  2985. /(?-i:a)b/i
  2986. aB
  2987. /((?-i:a))b/i
  2988. aB
  2989. /(?-i:a)b/i
  2990. *** Failers
  2991. Ab
  2992. AB
  2993. /((?-i:a))b/i
  2994. /((?-i:a.))b/i
  2995. *** Failers
  2996. AB
  2997. a\nB
  2998. /((?s-i:a.))b/i
  2999. a\nB
  3000. /(?:c|d)(?:)(?:a(?:)(?:b)(?:b(?:))(?:b(?:)(?:b)))/
  3001. cabbbb
  3002. /(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))/
  3003. caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
  3004. /foo\w*\d{4}baz/
  3005. foobar1234baz
  3006. /x(~~)*(?:(?:F)?)?/
  3007. x~~
  3008. /^a(?#xxx){3}c/
  3009. aaac
  3010. /^a (?#xxx) (?#yyy) {3}c/x
  3011. aaac
  3012. /(?<![cd])b/
  3013. *** Failers
  3014. B\nB
  3015. dbcb
  3016. /(?<![cd])[ab]/
  3017. dbaacb
  3018. /(?<!(c|d))b/
  3019. /(?<!(c|d))[ab]/
  3020. dbaacb
  3021. /(?<!cd)[ab]/
  3022. cdaccb
  3023. /^(?:a?b?)*$/
  3024. *** Failers
  3025. dbcb
  3026. a--
  3027. /((?s)^a(.))((?m)^b$)/
  3028. a\nb\nc\n
  3029. /((?m)^b$)/
  3030. a\nb\nc\n
  3031. /(?m)^b/
  3032. a\nb\n
  3033. /(?m)^(b)/
  3034. a\nb\n
  3035. /((?m)^b)/
  3036. a\nb\n
  3037. /\n((?m)^b)/
  3038. a\nb\n
  3039. /((?s).)c(?!.)/
  3040. a\nb\nc\n
  3041. a\nb\nc\n
  3042. /((?s)b.)c(?!.)/
  3043. a\nb\nc\n
  3044. a\nb\nc\n
  3045. /^b/
  3046. /()^b/
  3047. *** Failers
  3048. a\nb\nc\n
  3049. a\nb\nc\n
  3050. /((?m)^b)/
  3051. a\nb\nc\n
  3052. /(?(?!a)a|b)/
  3053. /(?(?!a)b|a)/
  3054. a
  3055. /(?(?=a)b|a)/
  3056. *** Failers
  3057. a
  3058. a
  3059. /(?(?=a)a|b)/
  3060. a
  3061. /(\w+:)+/
  3062. one:
  3063. /$(?<=^(a))/
  3064. a
  3065. /([\w:]+::)?(\w+)$/
  3066. abcd
  3067. xy:z:::abcd
  3068. /^[^bcd]*(c+)/
  3069. aexycd
  3070. /(a*)b+/
  3071. caab
  3072. /([\w:]+::)?(\w+)$/
  3073. abcd
  3074. xy:z:::abcd
  3075. *** Failers
  3076. abcd:
  3077. abcd:
  3078. /^[^bcd]*(c+)/
  3079. aexycd
  3080. /(>a+)ab/
  3081. /(?>a+)b/
  3082. aaab
  3083. /([[:]+)/
  3084. a:[b]:
  3085. /([[=]+)/
  3086. a=[b]=
  3087. /([[.]+)/
  3088. a.[b].
  3089. /((?>a+)b)/
  3090. aaab
  3091. /(?>(a+))b/
  3092. aaab
  3093. /((?>[^()]+)|\([^()]*\))+/
  3094. ((abc(ade)ufh()()x
  3095. /a\Z/
  3096. *** Failers
  3097. aaab
  3098. a\nb\n
  3099. /b\Z/
  3100. a\nb\n
  3101. /b\z/
  3102. /b\Z/
  3103. a\nb
  3104. /b\z/
  3105. a\nb
  3106. *** Failers
  3107. /(?>.*)(?<=(abcd|wxyz))/
  3108. alphabetabcd
  3109. endingwxyz
  3110. *** Failers
  3111. a rather long string that doesn't end with one of them
  3112. /word (?>(?:(?!otherword)[a-zA-Z0-9]+ ){0,30})otherword/
  3113. word cat dog elephant mussel cow horse canary baboon snake shark otherword
  3114. word cat dog elephant mussel cow horse canary baboon snake shark
  3115. /word (?>[a-zA-Z0-9]+ ){0,30}otherword/
  3116. 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
  3117. /(?<=\d{3}(?!999))foo/
  3118. 999foo
  3119. 123999foo
  3120. *** Failers
  3121. 123abcfoo
  3122. /(?<=(?!...999)\d{3})foo/
  3123. 999foo
  3124. 123999foo
  3125. *** Failers
  3126. 123abcfoo
  3127. /(?<=\d{3}(?!999)...)foo/
  3128. 123abcfoo
  3129. 123456foo
  3130. *** Failers
  3131. 123999foo
  3132. /(?<=\d{3}...)(?<!999)foo/
  3133. 123abcfoo
  3134. 123456foo
  3135. *** Failers
  3136. 123999foo
  3137. /((Z)+|A)*/
  3138. ZABCDEFG
  3139. /(Z()|A)*/
  3140. ZABCDEFG
  3141. /(Z(())|A)*/
  3142. ZABCDEFG
  3143. /((?>Z)+|A)*/
  3144. ZABCDEFG
  3145. /((?>)+|A)*/
  3146. ZABCDEFG
  3147. /a*/g
  3148. abbab
  3149. /^[\d-a]/
  3150. abcde
  3151. -things
  3152. 0digit
  3153. *** Failers
  3154. bcdef
  3155. /[[:space:]]+/
  3156. > \x09\x0a\x0c\x0d\x0b<
  3157. /[[:blank:]]+/
  3158. > \x09\x0a\x0c\x0d\x0b<
  3159. /[\s]+/
  3160. > \x09\x0a\x0c\x0d\x0b<
  3161. /\s+/
  3162. > \x09\x0a\x0c\x0d\x0b<
  3163. /a b/x
  3164. ab
  3165. /(?!\A)x/m
  3166. a\nxb\n
  3167. /(?!^)x/m
  3168. a\nxb\n
  3169. /abc\Qabc\Eabc/
  3170. abcabcabc
  3171. /abc\Q(*+|\Eabc/
  3172. abc(*+|abc
  3173. / abc\Q abc\Eabc/x
  3174. abc abcabc
  3175. *** Failers
  3176. abcabcabc
  3177. /abc#comment
  3178. \Q#not comment
  3179. literal\E/x
  3180. abc#not comment\n literal
  3181. /abc#comment
  3182. \Q#not comment
  3183. literal/x
  3184. abc#not comment\n literal
  3185. /abc#comment
  3186. \Q#not comment
  3187. literal\E #more comment
  3188. /x
  3189. abc#not comment\n literal
  3190. /abc#comment
  3191. \Q#not comment
  3192. literal\E #more comment/x
  3193. abc#not comment\n literal
  3194. /\Qabc\$xyz\E/
  3195. abc\\\$xyz
  3196. /\Qabc\E\$\Qxyz\E/
  3197. abc\$xyz
  3198. /\Gabc/
  3199. abc
  3200. *** Failers
  3201. xyzabc
  3202. /\Gabc./g
  3203. abc1abc2xyzabc3
  3204. /abc./g
  3205. abc1abc2xyzabc3
  3206. /a(?x: b c )d/
  3207. XabcdY
  3208. *** Failers
  3209. Xa b c d Y
  3210. /((?x)x y z | a b c)/
  3211. XabcY
  3212. AxyzB
  3213. /(?i)AB(?-i)C/
  3214. XabCY
  3215. *** Failers
  3216. XabcY
  3217. /((?i)AB(?-i)C|D)E/
  3218. abCE
  3219. DE
  3220. *** Failers
  3221. abcE
  3222. abCe
  3223. dE
  3224. De
  3225. /[z\Qa-d]\E]/
  3226. z
  3227. a
  3228. -
  3229. d
  3230. ]
  3231. *** Failers
  3232. b
  3233. /[\z\C]/
  3234. z
  3235. C
  3236. /\M/
  3237. M
  3238. /(a+)*b/
  3239. aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  3240. /(?i)reg(?:ul(?:[aä]|ae)r|ex)/
  3241. REGular
  3242. regulaer
  3243. Regex
  3244. regulär
  3245. /Åæåä[à-ÿÀ-ß]+/
  3246. Åæåäà
  3247. Åæåäÿ
  3248. ÅæåäÀ
  3249. Åæåäß
  3250. /(?<=Z)X./
  3251. \x84XAZXB
  3252. /^(?(2)a|(1)(2))+$/
  3253. 123a
  3254. /(?<=a|bbbb)c/
  3255. ac
  3256. bbbbc
  3257. /abc/SS>testsavedregex
  3258. <testsavedregex
  3259. abc
  3260. *** Failers
  3261. bca
  3262. /abc/FSS>testsavedregex
  3263. <testsavedregex
  3264. abc
  3265. *** Failers
  3266. bca
  3267. /(a|b)/S>testsavedregex
  3268. <testsavedregex
  3269. abc
  3270. *** Failers
  3271. def
  3272. /(a|b)/SF>testsavedregex
  3273. <testsavedregex
  3274. abc
  3275. *** Failers
  3276. def
  3277. /line\nbreak/
  3278. this is a line\nbreak
  3279. line one\nthis is a line\nbreak in the second line
  3280. /line\nbreak/f
  3281. this is a line\nbreak
  3282. ** Failers
  3283. line one\nthis is a line\nbreak in the second line
  3284. /line\nbreak/mf
  3285. this is a line\nbreak
  3286. ** Failers
  3287. line one\nthis is a line\nbreak in the second line
  3288. /1234/
  3289. 123\P
  3290. a4\P\R
  3291. /1234/
  3292. 123\P
  3293. 4\P\R
  3294. /^/mg
  3295. a\nb\nc\n
  3296. \
  3297. /(?<=C\n)^/mg
  3298. A\nC\nC\n
  3299. /(?s)A?B/
  3300. AB
  3301. aB
  3302. /(?s)A*B/
  3303. AB
  3304. aB
  3305. /(?m)A?B/
  3306. AB
  3307. aB
  3308. /(?m)A*B/
  3309. AB
  3310. aB
  3311. /Content-Type\x3A[^\r\n]{6,}/
  3312. Content-Type:xxxxxyyy
  3313. /Content-Type\x3A[^\r\n]{6,}z/
  3314. Content-Type:xxxxxyyyz
  3315. /Content-Type\x3A[^a]{6,}/
  3316. Content-Type:xxxyyy
  3317. /Content-Type\x3A[^a]{6,}z/
  3318. Content-Type:xxxyyyz
  3319. /^abc/m
  3320. xyz\nabc
  3321. xyz\nabc\<lf>
  3322. xyz\r\nabc\<lf>
  3323. xyz\rabc\<cr>
  3324. xyz\r\nabc\<crlf>
  3325. ** Failers
  3326. xyz\nabc\<cr>
  3327. xyz\r\nabc\<cr>
  3328. xyz\nabc\<crlf>
  3329. xyz\rabc\<crlf>
  3330. xyz\rabc\<lf>
  3331. /abc$/m<lf>
  3332. xyzabc
  3333. xyzabc\n
  3334. xyzabc\npqr
  3335. xyzabc\r\<cr>
  3336. xyzabc\rpqr\<cr>
  3337. xyzabc\r\n\<crlf>
  3338. xyzabc\r\npqr\<crlf>
  3339. ** Failers
  3340. xyzabc\r
  3341. xyzabc\rpqr
  3342. xyzabc\r\n
  3343. xyzabc\r\npqr
  3344. /^abc/m<cr>
  3345. xyz\rabcdef
  3346. xyz\nabcdef\<lf>
  3347. ** Failers
  3348. xyz\nabcdef
  3349. /^abc/m<lf>
  3350. xyz\nabcdef
  3351. xyz\rabcdef\<cr>
  3352. ** Failers
  3353. xyz\rabcdef
  3354. /^abc/m<crlf>
  3355. xyz\r\nabcdef
  3356. xyz\rabcdef\<cr>
  3357. ** Failers
  3358. xyz\rabcdef
  3359. /.*/<lf>
  3360. abc\ndef
  3361. abc\rdef
  3362. abc\r\ndef
  3363. \<cr>abc\ndef
  3364. \<cr>abc\rdef
  3365. \<cr>abc\r\ndef
  3366. \<crlf>abc\ndef
  3367. \<crlf>abc\rdef
  3368. \<crlf>abc\r\ndef
  3369. /\w+(.)(.)?def/s
  3370. abc\ndef
  3371. abc\rdef
  3372. abc\r\ndef
  3373. /^\w+=.*(\\\n.*)*/
  3374. abc=xyz\\\npqr
  3375. /^(a()*)*/
  3376. aaaa
  3377. /^(?:a(?:(?:))*)*/
  3378. aaaa
  3379. /^(a()+)+/
  3380. aaaa
  3381. /^(?:a(?:(?:))+)+/
  3382. aaaa
  3383. /(a|)*\d/
  3384. aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  3385. aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
  3386. /(?>a|)*\d/
  3387. aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  3388. aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
  3389. /(?:a|)*\d/
  3390. aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  3391. aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
  3392. /^a.b/<lf>
  3393. a\rb
  3394. a\nb\<cr>
  3395. ** Failers
  3396. a\nb
  3397. a\nb\<any>
  3398. a\rb\<cr>
  3399. a\rb\<any>
  3400. /^abc./mgx<any>
  3401. abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x85abc7 JUNK
  3402. /abc.$/mgx<any>
  3403. abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc9
  3404. /^a\Rb/<bsr_unicode>
  3405. a\nb
  3406. a\rb
  3407. a\r\nb
  3408. a\x0bb
  3409. a\x0cb
  3410. a\x85b
  3411. ** Failers
  3412. a\n\rb
  3413. /^a\R*b/<bsr_unicode>
  3414. ab
  3415. a\nb
  3416. a\rb
  3417. a\r\nb
  3418. a\x0bb
  3419. a\x0cb
  3420. a\x85b
  3421. a\n\rb
  3422. a\n\r\x85\x0cb
  3423. /^a\R+b/<bsr_unicode>
  3424. a\nb
  3425. a\rb
  3426. a\r\nb
  3427. a\x0bb
  3428. a\x0cb
  3429. a\x85b
  3430. a\n\rb
  3431. a\n\r\x85\x0cb
  3432. ** Failers
  3433. ab
  3434. /^a\R{1,3}b/<bsr_unicode>
  3435. a\nb
  3436. a\n\rb
  3437. a\n\r\x85b
  3438. a\r\n\r\nb
  3439. a\r\n\r\n\r\nb
  3440. a\n\r\n\rb
  3441. a\n\n\r\nb
  3442. ** Failers
  3443. a\n\n\n\rb
  3444. a\r
  3445. /^a[\R]b/<bsr_unicode>
  3446. aRb
  3447. ** Failers
  3448. a\nb
  3449. /.+foo/
  3450. afoo
  3451. ** Failers
  3452. \r\nfoo
  3453. \nfoo
  3454. /.+foo/<crlf>
  3455. afoo
  3456. \nfoo
  3457. ** Failers
  3458. \r\nfoo
  3459. /.+foo/<any>
  3460. afoo
  3461. ** Failers
  3462. \nfoo
  3463. \r\nfoo
  3464. /.+foo/s
  3465. afoo
  3466. \r\nfoo
  3467. \nfoo
  3468. /^$/mg<any>
  3469. abc\r\rxyz
  3470. abc\n\rxyz
  3471. ** Failers
  3472. abc\r\nxyz
  3473. /^X/m
  3474. XABC
  3475. ** Failers
  3476. XABC\B
  3477. /(?m)^$/<any>g+
  3478. abc\r\n\r\n
  3479. /(?m)^$|^\r\n/<any>g+
  3480. abc\r\n\r\n
  3481. /(?m)$/<any>g+
  3482. abc\r\n\r\n
  3483. /(?|(abc)|(xyz))/
  3484. >abc<
  3485. >xyz<
  3486. /(x)(?|(abc)|(xyz))(x)/
  3487. xabcx
  3488. xxyzx
  3489. /(x)(?|(abc)(pqr)|(xyz))(x)/
  3490. xabcpqrx
  3491. xxyzx
  3492. /(?|(abc)|(xyz))(?1)/
  3493. abcabc
  3494. xyzabc
  3495. ** Failers
  3496. xyzxyz
  3497. /\H\h\V\v/
  3498. X X\x0a
  3499. X\x09X\x0b
  3500. ** Failers
  3501. \xa0 X\x0a
  3502. /\H*\h+\V?\v{3,4}/
  3503. \x09\x20\xa0X\x0a\x0b\x0c\x0d\x0a
  3504. \x09\x20\xa0\x0a\x0b\x0c\x0d\x0a
  3505. \x09\x20\xa0\x0a\x0b\x0c
  3506. ** Failers
  3507. \x09\x20\xa0\x0a\x0b
  3508. /\H{3,4}/
  3509. XY ABCDE
  3510. XY PQR ST
  3511. /.\h{3,4}./
  3512. XY AB PQRS
  3513. /\h*X\h?\H+Y\H?Z/
  3514. >XNNNYZ
  3515. > X NYQZ
  3516. ** Failers
  3517. >XYZ
  3518. > X NY Z
  3519. /\v*X\v?Y\v+Z\V*\x0a\V+\x0b\V{2,3}\x0c/
  3520. >XY\x0aZ\x0aA\x0bNN\x0c
  3521. >\x0a\x0dX\x0aY\x0a\x0bZZZ\x0aAAA\x0bNNN\x0c
  3522. /.+A/<crlf>
  3523. \r\nA
  3524. /\nA/<crlf>
  3525. \r\nA
  3526. /[\r\n]A/<crlf>
  3527. \r\nA
  3528. /(\r|\n)A/<crlf>
  3529. \r\nA
  3530. /a\Rb/I<bsr_anycrlf>
  3531. a\rb
  3532. a\nb
  3533. a\r\nb
  3534. ** Failers
  3535. a\x85b
  3536. a\x0bb
  3537. /a\Rb/I<bsr_unicode>
  3538. a\rb
  3539. a\nb
  3540. a\r\nb
  3541. a\x85b
  3542. a\x0bb
  3543. ** Failers
  3544. a\x85b\<bsr_anycrlf>
  3545. a\x0bb\<bsr_anycrlf>
  3546. /a\R?b/I<bsr_anycrlf>
  3547. a\rb
  3548. a\nb
  3549. a\r\nb
  3550. ** Failers
  3551. a\x85b
  3552. a\x0bb
  3553. /a\R?b/I<bsr_unicode>
  3554. a\rb
  3555. a\nb
  3556. a\r\nb
  3557. a\x85b
  3558. a\x0bb
  3559. ** Failers
  3560. a\x85b\<bsr_anycrlf>
  3561. a\x0bb\<bsr_anycrlf>
  3562. /a\R{2,4}b/I<bsr_anycrlf>
  3563. a\r\n\nb
  3564. a\n\r\rb
  3565. a\r\n\r\n\r\n\r\nb
  3566. ** Failers
  3567. a\x85\85b
  3568. a\x0b\0bb
  3569. /a\R{2,4}b/I<bsr_unicode>
  3570. a\r\rb
  3571. a\n\n\nb
  3572. a\r\n\n\r\rb
  3573. a\x85\85b
  3574. a\x0b\0bb
  3575. ** Failers
  3576. a\r\r\r\r\rb
  3577. a\x85\85b\<bsr_anycrlf>
  3578. a\x0b\0bb\<bsr_anycrlf>
  3579. /a(?!)|\wbc/
  3580. abc
  3581. /a[]b/<JS>
  3582. ** Failers
  3583. ab
  3584. /a[]+b/<JS>
  3585. ** Failers
  3586. ab
  3587. /a[]*+b/<JS>
  3588. ** Failers
  3589. ab
  3590. /a[^]b/<JS>
  3591. aXb
  3592. a\nb
  3593. ** Failers
  3594. ab
  3595. /a[^]+b/<JS>
  3596. aXb
  3597. a\nX\nXb
  3598. ** Failers
  3599. ab
  3600. /X$/E
  3601. X
  3602. ** Failers
  3603. X\n
  3604. /X$/
  3605. X
  3606. X\n
  3607. /xyz/C
  3608. xyz
  3609. abcxyz
  3610. abcxyz\Y
  3611. ** Failers
  3612. abc
  3613. abc\Y
  3614. abcxypqr
  3615. abcxypqr\Y
  3616. /(*NO_START_OPT)xyz/C
  3617. abcxyz
  3618. /(?C)ab/
  3619. ab
  3620. \C-ab
  3621. /ab/C
  3622. ab
  3623. \C-ab
  3624. /^"((?(?=[a])[^"])|b)*"$/C
  3625. "ab"
  3626. \C-"ab"
  3627. /\d+X|9+Y/
  3628. ++++123999\P
  3629. ++++123999Y\P
  3630. /Z(*F)/
  3631. Z\P
  3632. ZA\P
  3633. /Z(?!)/
  3634. Z\P
  3635. ZA\P
  3636. /dog(sbody)?/
  3637. dogs\P
  3638. dogs\P\P
  3639. /dog(sbody)??/
  3640. dogs\P
  3641. dogs\P\P
  3642. /dog|dogsbody/
  3643. dogs\P
  3644. dogs\P\P
  3645. /dogsbody|dog/
  3646. dogs\P
  3647. dogs\P\P
  3648. /Z(*F)Q|ZXY/
  3649. Z\P
  3650. ZA\P
  3651. X\P
  3652. /\bthe cat\b/
  3653. the cat\P
  3654. the cat\P\P
  3655. /dog(sbody)?/
  3656. dogs\D\P
  3657. body\D\R
  3658. /dog(sbody)?/
  3659. dogs\D\P\P
  3660. body\D\R
  3661. /abc/
  3662. abc\P
  3663. abc\P\P
  3664. /abc\K123/
  3665. xyzabc123pqr
  3666. /(?<=abc)123/
  3667. xyzabc123pqr
  3668. xyzabc12\P
  3669. xyzabc12\P\P
  3670. /\babc\b/
  3671. +++abc+++
  3672. +++ab\P
  3673. +++ab\P\P
  3674. /(?=C)/g+
  3675. ABCDECBA
  3676. /(abc|def|xyz)/I
  3677. terhjk;abcdaadsfe
  3678. the quick xyz brown fox
  3679. \Yterhjk;abcdaadsfe
  3680. \Ythe quick xyz brown fox
  3681. ** Failers
  3682. thejk;adlfj aenjl;fda asdfasd ehj;kjxyasiupd
  3683. \Ythejk;adlfj aenjl;fda asdfasd ehj;kjxyasiupd
  3684. /(abc|def|xyz)/SI
  3685. terhjk;abcdaadsfe
  3686. the quick xyz brown fox
  3687. \Yterhjk;abcdaadsfe
  3688. \Ythe quick xyz brown fox
  3689. ** Failers
  3690. thejk;adlfj aenjl;fda asdfasd ehj;kjxyasiupd
  3691. \Ythejk;adlfj aenjl;fda asdfasd ehj;kjxyasiupd
  3692. /abcd*/+
  3693. xxxxabcd\P
  3694. xxxxabcd\P\P
  3695. dddxxx\R
  3696. xxxxabcd\P\P
  3697. xxx\R
  3698. /abcd*/i
  3699. xxxxabcd\P
  3700. xxxxabcd\P\P
  3701. XXXXABCD\P
  3702. XXXXABCD\P\P
  3703. /abc\d*/
  3704. xxxxabc1\P
  3705. xxxxabc1\P\P
  3706. /abc[de]*/
  3707. xxxxabcde\P
  3708. xxxxabcde\P\P
  3709. /(?:(?1)|B)(A(*F)|C)/
  3710. ABCD
  3711. CCD
  3712. ** Failers
  3713. CAD
  3714. /^(?:(?1)|B)(A(*F)|C)/
  3715. CCD
  3716. BCD
  3717. ** Failers
  3718. ABCD
  3719. CAD
  3720. BAD
  3721. /^(?!a(*SKIP)b)/
  3722. ac
  3723. /^(?=a(*SKIP)b|ac)/
  3724. ** Failers
  3725. ac
  3726. /^(?=a(*THEN)b|ac)/
  3727. ac
  3728. /^(?=a(*PRUNE)b)/
  3729. ab
  3730. ** Failers
  3731. ac
  3732. /^(?(?!a(*SKIP)b))/
  3733. ac
  3734. /(?<=abc)def/
  3735. abc\P\P
  3736. /abc$/
  3737. abc
  3738. abc\P
  3739. abc\P\P
  3740. /abc$/m
  3741. abc
  3742. abc\n
  3743. abc\P\P
  3744. abc\n\P\P
  3745. abc\P
  3746. abc\n\P
  3747. /abc\z/
  3748. abc
  3749. abc\P
  3750. abc\P\P
  3751. /abc\Z/
  3752. abc
  3753. abc\P
  3754. abc\P\P
  3755. /abc\b/
  3756. abc
  3757. abc\P
  3758. abc\P\P
  3759. /abc\B/
  3760. abc
  3761. abc\P
  3762. abc\P\P
  3763. /.+/
  3764. abc\>0
  3765. abc\>1
  3766. abc\>2
  3767. abc\>3
  3768. abc\>4
  3769. abc\>-4
  3770. /^(?:a)++\w/
  3771. aaaab
  3772. ** Failers
  3773. aaaa
  3774. bbb
  3775. /^(?:aa|(?:a)++\w)/
  3776. aaaab
  3777. aaaa
  3778. ** Failers
  3779. bbb
  3780. /^(?:a)*+\w/
  3781. aaaab
  3782. bbb
  3783. ** Failers
  3784. aaaa
  3785. /^(a)++\w/
  3786. aaaab
  3787. ** Failers
  3788. aaaa
  3789. bbb
  3790. /^(a|)++\w/
  3791. aaaab
  3792. ** Failers
  3793. aaaa
  3794. bbb
  3795. /(?=abc){3}abc/+
  3796. abcabcabc
  3797. ** Failers
  3798. xyz
  3799. /(?=abc)+abc/+
  3800. abcabcabc
  3801. ** Failers
  3802. xyz
  3803. /(?=abc)++abc/+
  3804. abcabcabc
  3805. ** Failers
  3806. xyz
  3807. /(?=abc){0}xyz/
  3808. xyz
  3809. /(?=abc){1}xyz/
  3810. ** Failers
  3811. xyz
  3812. /(?=(a))?./
  3813. ab
  3814. bc
  3815. /(?=(a))??./
  3816. ab
  3817. bc
  3818. /^(?=(a)){0}b(?1)/
  3819. backgammon
  3820. /^(?=(?1))?[az]([abc])d/
  3821. abd
  3822. zcdxx
  3823. /^(?!a){0}\w+/
  3824. aaaaa
  3825. /(?<=(abc))?xyz/
  3826. abcxyz
  3827. pqrxyz
  3828. /((?2))((?1))/
  3829. abc
  3830. /(?(R)a+|(?R)b)/
  3831. aaaabcde
  3832. /(?(R)a+|((?R))b)/
  3833. aaaabcde
  3834. /((?(R)a+|(?1)b))/
  3835. aaaabcde
  3836. /((?(R2)a+|(?1)b))/
  3837. aaaabcde
  3838. /(?(R)a*(?1)|((?R))b)/
  3839. aaaabcde
  3840. /(a+)/O
  3841. \O6aaaa
  3842. \O8aaaa
  3843. /ab\Cde/
  3844. abXde
  3845. /(?<=ab\Cde)X/
  3846. abZdeX
  3847. /^\R/
  3848. \r\P
  3849. \r\P\P
  3850. /^\R{2,3}x/
  3851. \r\P
  3852. \r\P\P
  3853. \r\r\P
  3854. \r\r\P\P
  3855. \r\r\r\P
  3856. \r\r\r\P\P
  3857. \r\rx
  3858. \r\r\rx
  3859. /^\R{2,3}?x/
  3860. \r\P
  3861. \r\P\P
  3862. \r\r\P
  3863. \r\r\P\P
  3864. \r\r\r\P
  3865. \r\r\r\P\P
  3866. \r\rx
  3867. \r\r\rx
  3868. /^\R?x/
  3869. \r\P
  3870. \r\P\P
  3871. x
  3872. \rx
  3873. /^\R+x/
  3874. \r\P
  3875. \r\P\P
  3876. \r\n\P
  3877. \r\n\P\P
  3878. \rx
  3879. /^a$/<CRLF>
  3880. a\r\P
  3881. a\r\P\P
  3882. /^a$/m<CRLF>
  3883. a\r\P
  3884. a\r\P\P
  3885. /^(a$|a\r)/<CRLF>
  3886. a\r\P
  3887. a\r\P\P
  3888. /^(a$|a\r)/m<CRLF>
  3889. a\r\P
  3890. a\r\P\P
  3891. /./<CRLF>
  3892. \r\P
  3893. \r\P\P
  3894. /.{2,3}/<CRLF>
  3895. \r\P
  3896. \r\P\P
  3897. \r\r\P
  3898. \r\r\P\P
  3899. \r\r\r\P
  3900. \r\r\r\P\P
  3901. /.{2,3}?/<CRLF>
  3902. \r\P
  3903. \r\P\P
  3904. \r\r\P
  3905. \r\r\P\P
  3906. \r\r\r\P
  3907. \r\r\r\P\P
  3908. /-- Test simple validity check for restarts --/
  3909. /abcdef/
  3910. abc\R
  3911. /<H((?(?!<H|F>)(.)|(?R))++)*F>/
  3912. text <H more text <H texting more hexA0-"\xA0" hex above 7F-"\xBC" F> text xxxxx <H text F> text F> text2 <H text sample F> more text.
  3913. /^(?>.{4})abc|^\w\w.xabcd/
  3914. xxxxabcd
  3915. xx\xa0xabcd
  3916. /^(.{4}){2}+abc|^\w\w.x\w\w\w\wabcd/
  3917. xxxxxxxxabcd
  3918. xx\xa0xxxxxabcd
  3919. /abcd/
  3920. abcd\O0
  3921. /-- These tests show up auto-possessification --/
  3922. /[ab]*/
  3923. aaaa
  3924. /[ab]*?/
  3925. aaaa
  3926. /[ab]?/
  3927. aaaa
  3928. /[ab]??/
  3929. aaaa
  3930. /[ab]+/
  3931. aaaa
  3932. /[ab]+?/
  3933. aaaa
  3934. /[ab]{2,3}/
  3935. aaaa
  3936. /[ab]{2,3}?/
  3937. aaaa
  3938. /[ab]{2,}/
  3939. aaaa
  3940. /[ab]{2,}?/
  3941. aaaa
  3942. '\A(?:[^\"]++|\"(?:[^\"]*+|\"\")*+\")++'
  3943. NON QUOTED \"QUOT\"\"ED\" AFTER \"NOT MATCHED
  3944. '\A(?:[^\"]++|\"(?:[^\"]++|\"\")*+\")++'
  3945. NON QUOTED \"QUOT\"\"ED\" AFTER \"NOT MATCHED
  3946. /(?(?!)a|b)/
  3947. bbb
  3948. aaa
  3949. /()()a+/O=
  3950. aaa\D
  3951. a\D
  3952. /(02-)?[0-9]{3}-[0-9]{3}/
  3953. 02-123-123
  3954. /-- End of testinput8 --/