| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029 |
- # This set of tests check the DFA matching functionality of pcre2_dfa_match(),
- # excluding UTF and Unicode property support. All matches are done using DFA,
- # forced by setting a default subject modifier at the start.
-
- #forbid_utf
- #subject dfa
- #newline_default lf anycrlf any
-
- /abc/
- abc
-
- /ab*c/
- abc
- abbbbc
- ac
-
- /ab+c/
- abc
- abbbbbbc
- \= Expect no match
- ac
- ab
-
- /a*/no_auto_possess
- a
- aaaaaaaaaaaaaaaaa
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\=ovector=10
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\=dfa_shortest
-
- /(a|abcd|african)/
- a
- abcd
- african
-
- /^abc/
- abcdef
- \= Expect no match
- xyzabc
- xyz\nabc
-
- /^abc/m
- abcdef
- xyz\nabc
- \= Expect no match
- xyzabc
-
- /\Aabc/
- abcdef
- \= Expect no match
- xyzabc
- xyz\nabc
-
- /\Aabc/m
- abcdef
- \= Expect no match
- xyzabc
- xyz\nabc
-
- /\Gabc/
- abcdef
- xyzabc\=offset=3
- \= Expect no match
- xyzabc
- xyzabc\=offset=2
-
- /x\dy\Dz/
- x9yzz
- x0y+z
- \= Expect no match
- xyz
- xxy0z
-
- /x\sy\Sz/
- x yzz
- x y+z
- \= Expect no match
- xyz
- xxyyz
-
- /x\wy\Wz/
- xxy+z
- \= Expect no match
- xxy0z
- x+y+z
-
- /x.y/
- x+y
- x-y
- \= Expect no match
- x\ny
-
- /x.y/s
- x+y
- x-y
- x\ny
- /(a.b(?s)c.d|x.y)p.q/
- a+bc+dp+q
- a+bc\ndp+q
- x\nyp+q
- \= Expect no match
- a\nbc\ndp+q
- a+bc\ndp\nq
- x\nyp\nq
- /a\d\z/
- ba0
- \= Expect no match
- ba0\n
- ba0\ncd
- /a\d\z/m
- ba0
- \= Expect no match
- ba0\n
- ba0\ncd
- /a\d\Z/
- ba0
- ba0\n
- \= Expect no match
- ba0\ncd
- /a\d\Z/m
- ba0
- ba0\n
- \= Expect no match
- ba0\ncd
- /a\d$/
- ba0
- ba0\n
- \= Expect no match
- ba0\ncd
- /a\d$/m
- ba0
- ba0\n
- ba0\ncd
- /abc/i
- abc
- aBc
- ABC
-
- /[^a]/
- abcd
-
- /ab?\w/
- abz
- abbz
- azz
- /x{0,3}yz/
- ayzq
- axyzq
- axxyz
- axxxyzq
- axxxxyzq
- \= Expect no match
- ax
- axx
-
- /x{3}yz/
- axxxyzq
- axxxxyzq
- \= Expect no match
- ax
- axx
- ayzq
- axyzq
- axxyz
-
- /x{2,3}yz/
- axxyz
- axxxyzq
- axxxxyzq
- \= Expect no match
- ax
- axx
- ayzq
- axyzq
-
- /[^a]+/no_auto_possess
- bac
- bcdefax
- \= Expect no match
- aaaaa
- /[^a]*/no_auto_possess
- bac
- bcdefax
- aaaaa
-
- /[^a]{3,5}/no_auto_possess
- xyz
- awxyza
- abcdefa
- abcdefghijk
- \= Expect no match
- axya
- axa
- aaaaa
- /\d*/
- 1234b567
- xyz
-
- /\D*/
- a1234b567
- xyz
-
- /\d+/
- ab1234c56
- \= Expect no match
- xyz
-
- /\D+/
- ab123c56
- \= Expect no match
- 789
-
- /\d?A/
- 045ABC
- ABC
- \= Expect no match
- XYZ
-
- /\D?A/
- ABC
- BAC
- 9ABC
- /a+/
- aaaa
- /^.*xyz/
- xyz
- ggggggggxyz
-
- /^.+xyz/
- abcdxyz
- axyz
- \= Expect no match
- xyz
-
- /^.?xyz/
- xyz
- cxyz
- /^\d{2,3}X/
- 12X
- 123X
- \= Expect no match
- X
- 1X
- 1234X
- /^[abcd]\d/
- a45
- b93
- c99z
- d04
- \= Expect no match
- e45
- abcd
- abcd1234
- 1234
- /^[abcd]*\d/
- a45
- b93
- c99z
- d04
- abcd1234
- 1234
- \= Expect no match
- e45
- abcd
- /^[abcd]+\d/
- a45
- b93
- c99z
- d04
- abcd1234
- \= Expect no match
- 1234
- e45
- abcd
- /^a+X/
- aX
- aaX
- /^[abcd]?\d/
- a45
- b93
- c99z
- d04
- 1234
- \= Expect no match
- abcd1234
- e45
- /^[abcd]{2,3}\d/
- ab45
- bcd93
- \= Expect no match
- 1234
- a36
- abcd1234
- ee45
- /^(abc)*\d/
- abc45
- abcabcabc45
- 42xyz
- /^(abc)+\d/
- abc45
- abcabcabc45
- \= Expect no match
- 42xyz
- /^(abc)?\d/
- abc45
- 42xyz
- \= Expect no match
- abcabcabc45
- /^(abc){2,3}\d/
- abcabc45
- abcabcabc45
- \= Expect no match
- abcabcabcabc45
- abc45
- 42xyz
- /1(abc|xyz)2(?1)3/
- 1abc2abc3456
- 1abc2xyz3456
- /^(a*\w|ab)=(a*\w|ab)/
- ab=ab
- /^(a*\w|ab)=(?1)/
- ab=ab
- /^([^()]|\((?1)*\))*$/
- abc
- a(b)c
- a(b(c))d
- \= Expect no match)
- a(b(c)d
- /^>abc>([^()]|\((?1)*\))*<xyz<$/
- >abc>123<xyz<
- >abc>1(2)3<xyz<
- >abc>(1(2)3)<xyz<
- /^(?>a*)\d/
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa9876
- \= Expect no match
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- /< (?: (?(R) \d++ | [^<>]*+) | (?R)) * >/x
- <>
- <abcd>
- <abc <123> hij>
- <abc <def> hij>
- <abc<>def>
- <abc<>
- \= Expect no match
- <abc
- /^(?(?=abc)\w{3}:|\d\d)$/
- abc:
- 12
- \= Expect no match
- 123
- xyz
-
- /^(?(?!abc)\d\d|\w{3}:)$/
- abc:
- 12
- \= Expect no match
- 123
- xyz
- /^(?=abc)\w{5}:$/
- abcde:
- \= Expect no match
- abc..
- 123
- vwxyz
-
- /^(?!abc)\d\d$/
- 12
- \= Expect no match
- abcde:
- abc..
- 123
- vwxyz
- /(?<=abc|xy)123/
- abc12345
- wxy123z
- \= Expect no match
- 123abc
- /(?<!abc|xy)123/
- 123abc
- mno123456
- \= Expect no match
- abc12345
- wxy123z
- /abc(?C1)xyz/
- abcxyz
- 123abcxyz999
- /(ab|cd){3,4}/auto_callout
- ababab
- abcdabcd
- abcdcdcdcdcd
- /^abc/
- abcdef
- \= Expect no match
- abcdef\=notbol
- /^(a*|xyz)/
- bcd
- aaabcd
- xyz
- xyz\=notempty
- \= Expect no match
- bcd\=notempty
-
- /xyz$/
- xyz
- xyz\n
- \= Expect no match
- xyz\=noteol
- xyz\n\=noteol
-
- /xyz$/m
- xyz
- xyz\n
- abcxyz\npqr
- abcxyz\npqr\=noteol
- xyz\n\=noteol
- \= Expect no match
- xyz\=noteol
- /\Gabc/
- abcdef
- defabcxyz\=offset=3
- \= Expect no match
- defabcxyz
- /^abcdef/
- ab\=ps
- abcde\=ps
- abcdef\=ps
- \= Expect no match
- abx\=ps
- /^a{2,4}\d+z/
- a\=ps
- aa\=ps
- aa2\=ps
- aaa\=ps
- aaa23\=ps
- aaaa12345\=ps
- aa0z\=ps
- aaaa4444444444444z\=ps
- \= Expect no match
- az\=ps
- aaaaa\=ps
- a56\=ps
- /^abcdef/
- abc\=ps
- def\=dfa_restart
-
- /(?<=foo)bar/
- foob\=ps,offset=2,allusedtext
- foobar...\=ps,dfa_restart,offset=4
- foobar\=offset=2
- \= Expect no match
- xyzfo\=ps
- obar\=dfa_restart
- /(ab*(cd|ef))+X/
- lkjhlkjhlkjhlkjhabbbbbbcdaefabbbbbbbefa\=ps,notbol,noteol
- cdabbbbbbbb\=ps,notbol,dfa_restart,noteol
- efabbbbbbbbbbbbbbbb\=ps,notbol,dfa_restart,noteol
- bbbbbbbbbbbbcdXyasdfadf\=ps,notbol,dfa_restart,noteol
- \= Expect no match
- adfadadaklhlkalkajhlkjahdfasdfasdfladsfjkj\=ps,noteol
- /the quick brown fox/
- the quick brown fox
- What do you know about the quick brown fox?
- \= Expect no match
- The quick brown FOX
- What do you know about THE QUICK BROWN FOX?
- /The quick brown fox/i
- the quick brown fox
- The quick brown FOX
- What do you know about the quick brown fox?
- What do you know about THE QUICK BROWN FOX?
- /abcd\t\n\r\f\a\e\071\x3b\$\\\?caxyz/
- abcd\t\n\r\f\a\e9;\$\\?caxyz
- /a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz/
- abxyzpqrrrabbxyyyypqAzz
- abxyzpqrrrabbxyyyypqAzz
- aabxyzpqrrrabbxyyyypqAzz
- aaabxyzpqrrrabbxyyyypqAzz
- aaaabxyzpqrrrabbxyyyypqAzz
- abcxyzpqrrrabbxyyyypqAzz
- aabcxyzpqrrrabbxyyyypqAzz
- aaabcxyzpqrrrabbxyyyypAzz
- aaabcxyzpqrrrabbxyyyypqAzz
- aaabcxyzpqrrrabbxyyyypqqAzz
- aaabcxyzpqrrrabbxyyyypqqqAzz
- aaabcxyzpqrrrabbxyyyypqqqqAzz
- aaabcxyzpqrrrabbxyyyypqqqqqAzz
- aaabcxyzpqrrrabbxyyyypqqqqqqAzz
- aaaabcxyzpqrrrabbxyyyypqAzz
- abxyzzpqrrrabbxyyyypqAzz
- aabxyzzzpqrrrabbxyyyypqAzz
- aaabxyzzzzpqrrrabbxyyyypqAzz
- aaaabxyzzzzpqrrrabbxyyyypqAzz
- abcxyzzpqrrrabbxyyyypqAzz
- aabcxyzzzpqrrrabbxyyyypqAzz
- aaabcxyzzzzpqrrrabbxyyyypqAzz
- aaaabcxyzzzzpqrrrabbxyyyypqAzz
- aaaabcxyzzzzpqrrrabbbxyyyypqAzz
- aaaabcxyzzzzpqrrrabbbxyyyyypqAzz
- aaabcxyzpqrrrabbxyyyypABzz
- aaabcxyzpqrrrabbxyyyypABBzz
- >>>aaabxyzpqrrrabbxyyyypqAzz
- >aaaabxyzpqrrrabbxyyyypqAzz
- >>>>abcxyzpqrrrabbxyyyypqAzz
- \= Expect no match
- abxyzpqrrabbxyyyypqAzz
- abxyzpqrrrrabbxyyyypqAzz
- abxyzpqrrrabxyyyypqAzz
- aaaabcxyzzzzpqrrrabbbxyyyyyypqAzz
- aaaabcxyzzzzpqrrrabbbxyyypqAzz
- aaabcxyzpqrrrabbxyyyypqqqqqqqAzz
- /^(abc){1,2}zz/
- abczz
- abcabczz
- \= Expect no match
- zz
- abcabcabczz
- >>abczz
- /^(b+?|a){1,2}?c/
- bc
- bbc
- bbbc
- bac
- bbac
- aac
- abbbbbbbbbbbc
- bbbbbbbbbbbac
- \= Expect no match
- aaac
- abbbbbbbbbbbac
- /^(b+|a){1,2}c/
- bc
- bbc
- bbbc
- bac
- bbac
- aac
- abbbbbbbbbbbc
- bbbbbbbbbbbac
- \= Expect no match
- aaac
- abbbbbbbbbbbac
- /^(b+|a){1,2}?bc/
- bbc
- /^(b*|ba){1,2}?bc/
- babc
- bbabc
- bababc
- \= Expect no match
- bababbc
- babababc
- /^(ba|b*){1,2}?bc/
- babc
- bbabc
- bababc
- \= Expect no match
- bababbc
- babababc
- /^\ca\cA\c[\c{\c:/
- \x01\x01\e;z
- /^[ab\]cde]/
- athing
- bthing
- ]thing
- cthing
- dthing
- ething
- \= Expect no match
- fthing
- [thing
- \\thing
- /^[]cde]/
- ]thing
- cthing
- dthing
- ething
- \= Expect no match
- athing
- fthing
- /^[^ab\]cde]/
- fthing
- [thing
- \\thing
- \= Expect no match
- athing
- bthing
- ]thing
- cthing
- dthing
- ething
- /^[^]cde]/
- athing
- fthing
- \= Expect no match
- ]thing
- cthing
- dthing
- ething
- /^\�/
- �
- /^ÿ/
- ÿ
- /^[0-9]+$/
- 0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 100
- \= Expect no match
- abc
- /^.*nter/
- enter
- inter
- uponter
- /^xxx[0-9]+$/
- xxx0
- xxx1234
- \= Expect no match
- xxx
- /^.+[0-9][0-9][0-9]$/
- x123
- xx123
- 123456
- x1234
- \= Expect no match
- 123
- /^.+?[0-9][0-9][0-9]$/
- x123
- xx123
- 123456
- x1234
- \= Expect no match
- 123
- /^([^!]+)!(.+)=apquxz\.ixr\.zzz\.ac\.uk$/
- abc!pqr=apquxz.ixr.zzz.ac.uk
- \= Expect no match
- !pqr=apquxz.ixr.zzz.ac.uk
- abc!=apquxz.ixr.zzz.ac.uk
- abc!pqr=apquxz:ixr.zzz.ac.uk
- abc!pqr=apquxz.ixr.zzz.ac.ukk
- /:/
- Well, we need a colon: somewhere
- \= Expect no match
- No match without a colon
- /([\da-f:]+)$/i
- 0abc
- abc
- fed
- E
- ::
- 5f03:12C0::932e
- fed def
- Any old stuff
- \= Expect no match
- 0zzz
- gzzz
- fed\x20
- Any old rubbish
- /^.*\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/
- .1.2.3
- A.12.123.0
- \= Expect no match
- .1.2.3333
- 1.2.3
- 1234.2.3
- /^(\d+)\s+IN\s+SOA\s+(\S+)\s+(\S+)\s*\(\s*$/
- 1 IN SOA non-sp1 non-sp2(
- 1 IN SOA non-sp1 non-sp2 (
- \= Expect no match
- 1IN SOA non-sp1 non-sp2(
- /^[a-zA-Z\d][a-zA-Z\d\-]*(\.[a-zA-Z\d][a-zA-z\d\-]*)*\.$/
- a.
- Z.
- 2.
- ab-c.pq-r.
- sxk.zzz.ac.uk.
- x-.y-.
- \= Expect no match
- -abc.peq.
- /^\*\.[a-z]([a-z\-\d]*[a-z\d]+)?(\.[a-z]([a-z\-\d]*[a-z\d]+)?)*$/
- *.a
- *.b0-a
- *.c3-b.c
- *.c-a.b-c
- \= Expect no match
- *.0
- *.a-
- *.a-b.c-
- *.c-a.0-c
- /^(?=ab(de))(abd)(e)/
- abde
- /^(?!(ab)de|x)(abd)(f)/
- abdf
- /^(?=(ab(cd)))(ab)/
- abcd
- /^[\da-f](\.[\da-f])*$/i
- a.b.c.d
- A.B.C.D
- a.b.c.1.2.3.C
- /^\".*\"\s*(;.*)?$/
- \"1234\"
- \"abcd\" ;
- \"\" ; rhubarb
- \= Expect no match
- \"1234\" : things
- /^$/
- \
- / ^ a (?# begins with a) b\sc (?# then b c) $ (?# then end)/x
- ab c
- \= Expect no match
- abc
- ab cde
- /(?x) ^ a (?# begins with a) b\sc (?# then b c) $ (?# then end)/
- ab c
- \= Expect no match
- abc
- ab cde
- /^ a\ b[c ]d $/x
- a bcd
- a b d
- \= Expect no match
- abcd
- ab d
- /^(a(b(c)))(d(e(f)))(h(i(j)))(k(l(m)))$/
- abcdefhijklm
- /^(?:a(b(c)))(?:d(e(f)))(?:h(i(j)))(?:k(l(m)))$/
- abcdefhijklm
- /^[\w][\W][\s][\S][\d][\D][\b][\n][\c]][\022]/
- a+ Z0+\x08\n\x1d\x12
- /^[.^$|()*+?{,}]+/
- .^\$(*+)|{?,?}
- /^a*\w/
- z
- az
- aaaz
- a
- aa
- aaaa
- a+
- aa+
- /^a*?\w/
- z
- az
- aaaz
- a
- aa
- aaaa
- a+
- aa+
- /^a+\w/
- az
- aaaz
- aa
- aaaa
- aa+
- /^a+?\w/
- az
- aaaz
- aa
- aaaa
- aa+
- /^\d{8}\w{2,}/
- 1234567890
- 12345678ab
- 12345678__
- \= Expect no match
- 1234567
- /^[aeiou\d]{4,5}$/
- uoie
- 1234
- 12345
- aaaaa
- \= Expect no match
- 123456
- /^[aeiou\d]{4,5}?/
- uoie
- 1234
- 12345
- aaaaa
- 123456
- /^From +([^ ]+) +[a-zA-Z][a-zA-Z][a-zA-Z] +[a-zA-Z][a-zA-Z][a-zA-Z] +[0-9]?[0-9] +[0-9][0-9]:[0-9][0-9]/
- From abcd Mon Sep 01 12:33:02 1997
- /^From\s+\S+\s+([a-zA-Z]{3}\s+){2}\d{1,2}\s+\d\d:\d\d/
- From abcd Mon Sep 01 12:33:02 1997
- From abcd Mon Sep 1 12:33:02 1997
- \= Expect no match
- From abcd Sep 01 12:33:02 1997
- /^12.34/s
- 12\n34
- 12\r34
- /\w+(?=\t)/
- the quick brown\t fox
- /foo(?!bar)(.*)/
- foobar is foolish see?
- /(?:(?!foo)...|^.{0,2})bar(.*)/
- foobar crowbar etc
- barrel
- 2barrel
- A barrel
- /^(\D*)(?=\d)(?!123)/
- abc456
- \= Expect no match
- abc123
- /^1234(?# test newlines
- inside)/
- 1234
- /^1234 #comment in extended re
- /x
- 1234
- /#rhubarb
- abcd/x
- abcd
- /^abcd#rhubarb/x
- abcd
- /(?!^)abc/
- the abc
- \= Expect no match
- abc
- /(?=^)abc/
- abc
- \= Expect no match
- the abc
- /^[ab]{1,3}(ab*|b)/no_auto_possess
- aabbbbb
- /^[ab]{1,3}?(ab*|b)/no_auto_possess
- aabbbbb
- /^[ab]{1,3}?(ab*?|b)/no_auto_possess
- aabbbbb
- /^[ab]{1,3}(ab*?|b)/no_auto_possess
- aabbbbb
- / (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* # optional leading comment
- (?: (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- |
- " (?: # opening quote...
- [^\\\x80-\xff\n\015"] # Anything except backslash and quote
- | # or
- \\ [^\x80-\xff] # Escaped something (something != CR)
- )* " # closing quote
- ) # initial word
- (?: (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* \. (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- |
- " (?: # opening quote...
- [^\\\x80-\xff\n\015"] # Anything except backslash and quote
- | # or
- \\ [^\x80-\xff] # Escaped something (something != CR)
- )* " # closing quote
- ) )* # further okay, if led by a period
- (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* @ (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- | \[ # [
- (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
- \] # ]
- ) # initial subdomain
- (?: #
- (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* \. # if led by a period...
- (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- | \[ # [
- (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
- \] # ]
- ) # ...further okay
- )*
- # address
- | # or
- (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- |
- " (?: # opening quote...
- [^\\\x80-\xff\n\015"] # Anything except backslash and quote
- | # or
- \\ [^\x80-\xff] # Escaped something (something != CR)
- )* " # closing quote
- ) # one word, optionally followed by....
- (?:
- [^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] | # atom and space parts, or...
- \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) | # comments, or...
- " (?: # opening quote...
- [^\\\x80-\xff\n\015"] # Anything except backslash and quote
- | # or
- \\ [^\x80-\xff] # Escaped something (something != CR)
- )* " # closing quote
- # quoted strings
- )*
- < (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* # leading <
- (?: @ (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- | \[ # [
- (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
- \] # ]
- ) # initial subdomain
- (?: #
- (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* \. # if led by a period...
- (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- | \[ # [
- (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
- \] # ]
- ) # ...further okay
- )*
- (?: (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* , (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* @ (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- | \[ # [
- (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
- \] # ]
- ) # initial subdomain
- (?: #
- (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* \. # if led by a period...
- (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- | \[ # [
- (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
- \] # ]
- ) # ...further okay
- )*
- )* # further okay, if led by comma
- : # closing colon
- (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* )? # optional route
- (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- |
- " (?: # opening quote...
- [^\\\x80-\xff\n\015"] # Anything except backslash and quote
- | # or
- \\ [^\x80-\xff] # Escaped something (something != CR)
- )* " # closing quote
- ) # initial word
- (?: (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* \. (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- |
- " (?: # opening quote...
- [^\\\x80-\xff\n\015"] # Anything except backslash and quote
- | # or
- \\ [^\x80-\xff] # Escaped something (something != CR)
- )* " # closing quote
- ) )* # further okay, if led by a period
- (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* @ (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- | \[ # [
- (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
- \] # ]
- ) # initial subdomain
- (?: #
- (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* \. # if led by a period...
- (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- | \[ # [
- (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
- \] # ]
- ) # ...further okay
- )*
- # address spec
- (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* > # trailing >
- # name and address
- ) (?: [\040\t] | \(
- (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
- \) )* # optional trailing comment
- /x
- Alan Other <user\@dom.ain>
- <user\@dom.ain>
- user\@dom.ain
- \"A. Other\" <user.1234\@dom.ain> (a comment)
- A. Other <user.1234\@dom.ain> (a comment)
- \"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"\@x400-re.lay
- A missing angle <user\@some.where
- \= Expect no match
- The quick brown fox
- /[\040\t]* # Nab whitespace.
- (?:
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: # (
- (?: \\ [^\x80-\xff] |
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
- \) # )
- ) # special
- [^\\\x80-\xff\n\015()] * # normal*
- )* # )*
- \) # )
- [\040\t]* )* # If comment found, allow more spaces.
- # optional leading comment
- (?:
- (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- # Atom
- | # or
- " # "
- [^\\\x80-\xff\n\015"] * # normal
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
- " # "
- # Quoted string
- )
- [\040\t]* # Nab whitespace.
- (?:
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: # (
- (?: \\ [^\x80-\xff] |
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
- \) # )
- ) # special
- [^\\\x80-\xff\n\015()] * # normal*
- )* # )*
- \) # )
- [\040\t]* )* # If comment found, allow more spaces.
- (?:
- \.
- [\040\t]* # Nab whitespace.
- (?:
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: # (
- (?: \\ [^\x80-\xff] |
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
- \) # )
- ) # special
- [^\\\x80-\xff\n\015()] * # normal*
- )* # )*
- \) # )
- [\040\t]* )* # If comment found, allow more spaces.
- (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- # Atom
- | # or
- " # "
- [^\\\x80-\xff\n\015"] * # normal
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
- " # "
- # Quoted string
- )
- [\040\t]* # Nab whitespace.
- (?:
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: # (
- (?: \\ [^\x80-\xff] |
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
- \) # )
- ) # special
- [^\\\x80-\xff\n\015()] * # normal*
- )* # )*
- \) # )
- [\040\t]* )* # If comment found, allow more spaces.
- # additional words
- )*
- @
- [\040\t]* # Nab whitespace.
- (?:
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: # (
- (?: \\ [^\x80-\xff] |
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
- \) # )
- ) # special
- [^\\\x80-\xff\n\015()] * # normal*
- )* # )*
- \) # )
- [\040\t]* )* # If comment found, allow more spaces.
- (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- |
- \[ # [
- (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
- \] # ]
- )
- [\040\t]* # Nab whitespace.
- (?:
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: # (
- (?: \\ [^\x80-\xff] |
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
- \) # )
- ) # special
- [^\\\x80-\xff\n\015()] * # normal*
- )* # )*
- \) # )
- [\040\t]* )* # If comment found, allow more spaces.
- # optional trailing comments
- (?:
- \.
- [\040\t]* # Nab whitespace.
- (?:
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: # (
- (?: \\ [^\x80-\xff] |
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
- \) # )
- ) # special
- [^\\\x80-\xff\n\015()] * # normal*
- )* # )*
- \) # )
- [\040\t]* )* # If comment found, allow more spaces.
- (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- |
- \[ # [
- (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
- \] # ]
- )
- [\040\t]* # Nab whitespace.
- (?:
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: # (
- (?: \\ [^\x80-\xff] |
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
- \) # )
- ) # special
- [^\\\x80-\xff\n\015()] * # normal*
- )* # )*
- \) # )
- [\040\t]* )* # If comment found, allow more spaces.
- # optional trailing comments
- )*
- # address
- | # or
- (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- # Atom
- | # or
- " # "
- [^\\\x80-\xff\n\015"] * # normal
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
- " # "
- # Quoted string
- )
- # leading word
- [^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] * # "normal" atoms and or spaces
- (?:
- (?:
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: # (
- (?: \\ [^\x80-\xff] |
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
- \) # )
- ) # special
- [^\\\x80-\xff\n\015()] * # normal*
- )* # )*
- \) # )
- |
- " # "
- [^\\\x80-\xff\n\015"] * # normal
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
- " # "
- ) # "special" comment or quoted string
- [^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] * # more "normal"
- )*
- <
- [\040\t]* # Nab whitespace.
- (?:
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: # (
- (?: \\ [^\x80-\xff] |
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
- \) # )
- ) # special
- [^\\\x80-\xff\n\015()] * # normal*
- )* # )*
- \) # )
- [\040\t]* )* # If comment found, allow more spaces.
- # <
- (?:
- @
- [\040\t]* # Nab whitespace.
- (?:
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: # (
- (?: \\ [^\x80-\xff] |
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
- \) # )
- ) # special
- [^\\\x80-\xff\n\015()] * # normal*
- )* # )*
- \) # )
- [\040\t]* )* # If comment found, allow more spaces.
- (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- |
- \[ # [
- (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
- \] # ]
- )
- [\040\t]* # Nab whitespace.
- (?:
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: # (
- (?: \\ [^\x80-\xff] |
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
- \) # )
- ) # special
- [^\\\x80-\xff\n\015()] * # normal*
- )* # )*
- \) # )
- [\040\t]* )* # If comment found, allow more spaces.
- # optional trailing comments
- (?:
- \.
- [\040\t]* # Nab whitespace.
- (?:
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: # (
- (?: \\ [^\x80-\xff] |
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
- \) # )
- ) # special
- [^\\\x80-\xff\n\015()] * # normal*
- )* # )*
- \) # )
- [\040\t]* )* # If comment found, allow more spaces.
- (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- |
- \[ # [
- (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
- \] # ]
- )
- [\040\t]* # Nab whitespace.
- (?:
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: # (
- (?: \\ [^\x80-\xff] |
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
- \) # )
- ) # special
- [^\\\x80-\xff\n\015()] * # normal*
- )* # )*
- \) # )
- [\040\t]* )* # If comment found, allow more spaces.
- # optional trailing comments
- )*
- (?: ,
- [\040\t]* # Nab whitespace.
- (?:
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: # (
- (?: \\ [^\x80-\xff] |
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
- \) # )
- ) # special
- [^\\\x80-\xff\n\015()] * # normal*
- )* # )*
- \) # )
- [\040\t]* )* # If comment found, allow more spaces.
- @
- [\040\t]* # Nab whitespace.
- (?:
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: # (
- (?: \\ [^\x80-\xff] |
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
- \) # )
- ) # special
- [^\\\x80-\xff\n\015()] * # normal*
- )* # )*
- \) # )
- [\040\t]* )* # If comment found, allow more spaces.
- (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- |
- \[ # [
- (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
- \] # ]
- )
- [\040\t]* # Nab whitespace.
- (?:
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: # (
- (?: \\ [^\x80-\xff] |
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
- \) # )
- ) # special
- [^\\\x80-\xff\n\015()] * # normal*
- )* # )*
- \) # )
- [\040\t]* )* # If comment found, allow more spaces.
- # optional trailing comments
- (?:
- \.
- [\040\t]* # Nab whitespace.
- (?:
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: # (
- (?: \\ [^\x80-\xff] |
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
- \) # )
- ) # special
- [^\\\x80-\xff\n\015()] * # normal*
- )* # )*
- \) # )
- [\040\t]* )* # If comment found, allow more spaces.
- (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- |
- \[ # [
- (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
- \] # ]
- )
- [\040\t]* # Nab whitespace.
- (?:
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: # (
- (?: \\ [^\x80-\xff] |
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
- \) # )
- ) # special
- [^\\\x80-\xff\n\015()] * # normal*
- )* # )*
- \) # )
- [\040\t]* )* # If comment found, allow more spaces.
- # optional trailing comments
- )*
- )* # additional domains
- :
- [\040\t]* # Nab whitespace.
- (?:
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: # (
- (?: \\ [^\x80-\xff] |
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
- \) # )
- ) # special
- [^\\\x80-\xff\n\015()] * # normal*
- )* # )*
- \) # )
- [\040\t]* )* # If comment found, allow more spaces.
- # optional trailing comments
- )? # optional route
- (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- # Atom
- | # or
- " # "
- [^\\\x80-\xff\n\015"] * # normal
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
- " # "
- # Quoted string
- )
- [\040\t]* # Nab whitespace.
- (?:
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: # (
- (?: \\ [^\x80-\xff] |
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
- \) # )
- ) # special
- [^\\\x80-\xff\n\015()] * # normal*
- )* # )*
- \) # )
- [\040\t]* )* # If comment found, allow more spaces.
- (?:
- \.
- [\040\t]* # Nab whitespace.
- (?:
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: # (
- (?: \\ [^\x80-\xff] |
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
- \) # )
- ) # special
- [^\\\x80-\xff\n\015()] * # normal*
- )* # )*
- \) # )
- [\040\t]* )* # If comment found, allow more spaces.
- (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- # Atom
- | # or
- " # "
- [^\\\x80-\xff\n\015"] * # normal
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
- " # "
- # Quoted string
- )
- [\040\t]* # Nab whitespace.
- (?:
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: # (
- (?: \\ [^\x80-\xff] |
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
- \) # )
- ) # special
- [^\\\x80-\xff\n\015()] * # normal*
- )* # )*
- \) # )
- [\040\t]* )* # If comment found, allow more spaces.
- # additional words
- )*
- @
- [\040\t]* # Nab whitespace.
- (?:
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: # (
- (?: \\ [^\x80-\xff] |
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
- \) # )
- ) # special
- [^\\\x80-\xff\n\015()] * # normal*
- )* # )*
- \) # )
- [\040\t]* )* # If comment found, allow more spaces.
- (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- |
- \[ # [
- (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
- \] # ]
- )
- [\040\t]* # Nab whitespace.
- (?:
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: # (
- (?: \\ [^\x80-\xff] |
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
- \) # )
- ) # special
- [^\\\x80-\xff\n\015()] * # normal*
- )* # )*
- \) # )
- [\040\t]* )* # If comment found, allow more spaces.
- # optional trailing comments
- (?:
- \.
- [\040\t]* # Nab whitespace.
- (?:
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: # (
- (?: \\ [^\x80-\xff] |
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
- \) # )
- ) # special
- [^\\\x80-\xff\n\015()] * # normal*
- )* # )*
- \) # )
- [\040\t]* )* # If comment found, allow more spaces.
- (?:
- [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
- (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
- |
- \[ # [
- (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
- \] # ]
- )
- [\040\t]* # Nab whitespace.
- (?:
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: # (
- (?: \\ [^\x80-\xff] |
- \( # (
- [^\\\x80-\xff\n\015()] * # normal*
- (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
- \) # )
- ) # special
- [^\\\x80-\xff\n\015()] * # normal*
- )* # )*
- \) # )
- [\040\t]* )* # If comment found, allow more spaces.
- # optional trailing comments
- )*
- # address spec
- > # >
- # name and address
- )
- /x
- Alan Other <user\@dom.ain>
- <user\@dom.ain>
- user\@dom.ain
- \"A. Other\" <user.1234\@dom.ain> (a comment)
- A. Other <user.1234\@dom.ain> (a comment)
- \"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"\@x400-re.lay
- A missing angle <user\@some.where
- \= Expect no match
- The quick brown fox
- /abc\0def\00pqr\000xyz\0000AB/
- abc\0def\00pqr\000xyz\0000AB
- abc456 abc\0def\00pqr\000xyz\0000ABCDE
- /abc\x0def\x00pqr\x000xyz\x0000AB/
- abc\x0def\x00pqr\x000xyz\x0000AB
- abc456 abc\x0def\x00pqr\x000xyz\x0000ABCDE
- /^[\000-\037]/
- \0A
- \01B
- \037C
- /\0*/
- \0\0\0\0
- /A\x0{2,3}Z/
- The A\x0\x0Z
- An A\0\x0\0Z
- \= Expect no match
- A\0Z
- A\0\x0\0\x0Z
- /^\s/
- \040abc
- \x0cabc
- \nabc
- \rabc
- \tabc
- \= Expect no match
- abc
- /^a b
- c/x
- abc
- /ab{1,3}bc/
- abbbbc
- abbbc
- abbc
- \= Expect no match
- abc
- abbbbbc
- /([^.]*)\.([^:]*):[T ]+(.*)/
- track1.title:TBlah blah blah
- /([^.]*)\.([^:]*):[T ]+(.*)/i
- track1.title:TBlah blah blah
- /([^.]*)\.([^:]*):[t ]+(.*)/i
- track1.title:TBlah blah blah
- /^[W-c]+$/
- WXY_^abc
- \= Expect no match
- wxy
- /^[W-c]+$/i
- WXY_^abc
- wxy_^ABC
- /^[\x3f-\x5F]+$/i
- WXY_^abc
- wxy_^ABC
- /^abc$/m
- abc
- qqq\nabc
- abc\nzzz
- qqq\nabc\nzzz
- /^abc$/
- abc
- \= Expect no match
- qqq\nabc
- abc\nzzz
- qqq\nabc\nzzz
- /\Aabc\Z/m
- abc
- abc\n
- \= Expect no match
- qqq\nabc
- abc\nzzz
- qqq\nabc\nzzz
-
- /\A(.)*\Z/s
- abc\ndef
- /\A(.)*\Z/m
- \= Expect no match
- abc\ndef
- /(?:b)|(?::+)/
- b::c
- c::b
- /[-az]+/
- az-
- \= Expect no match
- b
- /[az-]+/
- za-
- \= Expect no match
- b
- /[a\-z]+/
- a-z
- \= Expect no match
- b
- /[a-z]+/
- abcdxyz
- /[\d-]+/
- 12-34
- \= Expect no match
- aaa
- /\x5c/
- \\
- /\x20Z/
- the Zoo
- \= Expect no match
- Zulu
- /ab{3cd/
- ab{3cd
- /ab{3,cd/
- ab{3,cd
- /ab{3,4a}cd/
- ab{3,4a}cd
- /{4,5a}bc/
- {4,5a}bc
- /^a.b/newline=lf
- a\rb
- \= Expect no match
- a\nb
- /abc$/
- abc
- abc\n
- \= Expect no match
- abc\ndef
- /(abc)\123/
- abc\x53
- /(abc)\223/
- abc\x93
- /(abc)\323/
- abc\xd3
- /(abc)\100/
- abc\x40
- abc\100
- /(abc)\1000/
- abc\x400
- abc\x40\x30
- abc\1000
- abc\100\x30
- abc\100\060
- abc\100\60
- /(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\12\123/
- abcdefghijk\12S
- /a{0}bc/
- bc
- /(a|(bc)){0,0}?xyz/
- xyz
- /abc[\10]de/
- abc\010de
- /abc[\1]de/
- abc\1de
- /(abc)[\1]de/
- abc\1de
- /(?s)a.b/
- a\nb
- /^([^a])([^\b])([^c]*)([^d]{3,4})/
- baNOTccccd
- baNOTcccd
- baNOTccd
- bacccd
- \= Expect no match
- anything
- b\bc
- baccd
- /[^a]/
- Abc
-
- /[^a]/i
- Abc
- /[^a]+/
- AAAaAbc
-
- /[^a]+/i
- AAAaAbc
- /[^a]+/
- bbb\nccc
-
- /[^k]$/
- abc
- \= Expect no match
- abk
-
- /[^k]{2,3}$/
- abc
- kbc
- kabc
- \= Expect no match
- abk
- akb
- akk
- /^\d{8,}\@.+[^k]$/
- 12345678\@a.b.c.d
- 123456789\@x.y.z
- \= Expect no match
- 12345678\@x.y.uk
- 1234567\@a.b.c.d
- /[^a]/
- aaaabcd
- aaAabcd
- /[^a]/i
- aaaabcd
- aaAabcd
- /[^az]/
- aaaabcd
- aaAabcd
- /[^az]/i
- aaaabcd
- aaAabcd
- /\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131\132\133\134\135\136\137\140\141\142\143\144\145\146\147\150\151\152\153\154\155\156\157\160\161\162\163\164\165\166\167\170\171\172\173\174\175\176\177\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377/
- \000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131\132\133\134\135\136\137\140\141\142\143\144\145\146\147\150\151\152\153\154\155\156\157\160\161\162\163\164\165\166\167\170\171\172\173\174\175\176\177\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377
- /P[^*]TAIRE[^*]{1,6}?LL/
- xxxxxxxxxxxPSTAIREISLLxxxxxxxxx
- /P[^*]TAIRE[^*]{1,}?LL/
- xxxxxxxxxxxPSTAIREISLLxxxxxxxxx
- /(\.\d\d[1-9]?)\d+/
- 1.230003938
- 1.875000282
- 1.235
-
- /(\.\d\d((?=0)|\d(?=\d)))/
- 1.230003938
- 1.875000282
- \= Expect no match
- 1.235
-
- /a(?)b/
- ab
-
- /\b(foo)\s+(\w+)/i
- Food is on the foo table
-
- /foo(.*)bar/
- The food is under the bar in the barn.
-
- /foo(.*?)bar/
- The food is under the bar in the barn.
- /(.*)(\d*)/no_auto_possess
- I have 2 numbers: 53147
-
- /(.*)(\d+)/
- I have 2 numbers: 53147
-
- /(.*?)(\d*)/no_auto_possess
- I have 2 numbers: 53147
- /(.*?)(\d+)/
- I have 2 numbers: 53147
- /(.*)(\d+)$/
- I have 2 numbers: 53147
- /(.*?)(\d+)$/
- I have 2 numbers: 53147
- /(.*)\b(\d+)$/
- I have 2 numbers: 53147
- /(.*\D)(\d+)$/
- I have 2 numbers: 53147
- /^\D*(?!123)/
- ABC123
-
- /^(\D*)(?=\d)(?!123)/
- ABC445
- \= Expect no match
- ABC123
-
- /^[W-]46]/
- W46]789
- -46]789
- \= Expect no match
- Wall
- Zebra
- 42
- [abcd]
- ]abcd[
-
- /^[W-\]46]/
- W46]789
- Wall
- Zebra
- Xylophone
- 42
- [abcd]
- ]abcd[
- \\backslash
- \= Expect no match
- -46]789
- well
-
- /\d\d\/\d\d\/\d\d\d\d/
- 01/01/2000
- /word (?:[a-zA-Z0-9]+ ){0,10}otherword/
- word cat dog elephant mussel cow horse canary baboon snake shark otherword
- \= Expect no match
- word cat dog elephant mussel cow horse canary baboon snake shark
- /word (?:[a-zA-Z0-9]+ ){0,300}otherword/
- \= Expect no match
- word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope
- /^(a){0,0}/
- bcd
- abc
- aab
- /^(a){0,1}/
- bcd
- abc
- aab
- /^(a){0,2}/
- bcd
- abc
- aab
- /^(a){0,3}/
- bcd
- abc
- aab
- aaa
- /^(a){0,}/
- bcd
- abc
- aab
- aaa
- aaaaaaaa
- /^(a){1,1}/
- abc
- aab
- \= Expect no match
- bcd
- /^(a){1,2}/
- abc
- aab
- \= Expect no match
- bcd
- /^(a){1,3}/
- abc
- aab
- aaa
- \= Expect no match
- bcd
- /^(a){1,}/
- abc
- aab
- aaa
- aaaaaaaa
- \= Expect no match
- bcd
- /.*\.gif/
- borfle\nbib.gif\nno
- /.{0,}\.gif/
- borfle\nbib.gif\nno
- /.*\.gif/m
- borfle\nbib.gif\nno
- /.*\.gif/s
- borfle\nbib.gif\nno
- /.*\.gif/ms
- borfle\nbib.gif\nno
-
- /.*$/
- borfle\nbib.gif\nno
- /.*$/m
- borfle\nbib.gif\nno
- /.*$/s
- borfle\nbib.gif\nno
- /.*$/ms
- borfle\nbib.gif\nno
-
- /.*$/
- borfle\nbib.gif\nno\n
- /.*$/m
- borfle\nbib.gif\nno\n
- /.*$/s
- borfle\nbib.gif\nno\n
- /.*$/ms
- borfle\nbib.gif\nno\n
-
- /(.*X|^B)/
- abcde\n1234Xyz
- BarFoo
- \= Expect no match
- abcde\nBar
- /(.*X|^B)/m
- abcde\n1234Xyz
- BarFoo
- abcde\nBar
- /(.*X|^B)/s
- abcde\n1234Xyz
- BarFoo
- \= Expect no match
- abcde\nBar
- /(.*X|^B)/ms
- abcde\n1234Xyz
- BarFoo
- abcde\nBar
- /(?s)(.*X|^B)/
- abcde\n1234Xyz
- BarFoo
- \= Expect no match
- abcde\nBar
- /(?s:.*X|^B)/
- abcde\n1234Xyz
- BarFoo
- \= Expect no match
- abcde\nBar
- /^.*B/
- \= Expect no match
- abc\nB
-
- /(?s)^.*B/
- abc\nB
- /(?m)^.*B/
- abc\nB
-
- /(?ms)^.*B/
- abc\nB
- /(?ms)^B/
- abc\nB
- /(?s)B$/
- B\n
- /^[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/
- 123456654321
-
- /^\d\d\d\d\d\d\d\d\d\d\d\d/
- 123456654321
- /^[\d][\d][\d][\d][\d][\d][\d][\d][\d][\d][\d][\d]/
- 123456654321
-
- /^[abc]{12}/
- abcabcabcabc
-
- /^[a-c]{12}/
- abcabcabcabc
-
- /^(a|b|c){12}/
- abcabcabcabc
- /^[abcdefghijklmnopqrstuvwxy0123456789]/
- n
- \= Expect no match
- z
- /abcde{0,0}/
- abcd
- \= Expect no match
- abce
- /ab[cd]{0,0}e/
- abe
- \= Expect no match
- abcde
-
- /ab(c){0,0}d/
- abd
- \= Expect no match
- abcd
- /a(b*)/
- a
- ab
- abbbb
- \= Expect no match
- bbbbb
-
- /ab\d{0}e/
- abe
- \= Expect no match
- ab1e
-
- /"([^\\"]+|\\.)*"/
- the \"quick\" brown fox
- \"the \\\"quick\\\" brown fox\"
- /.*?/g,aftertext
- abc
-
- /\b/g,aftertext
- abc
- /\b/g,aftertext
- abc
- //g
- abc
- /<tr([\w\W\s\d][^<>]{0,})><TD([\w\W\s\d][^<>]{0,})>([\d]{0,}\.)(.*)((<BR>([\w\W\s\d][^<>]{0,})|[\s]{0,}))<\/a><\/TD><TD([\w\W\s\d][^<>]{0,})>([\w\W\s\d][^<>]{0,})<\/TD><TD([\w\W\s\d][^<>]{0,})>([\w\W\s\d][^<>]{0,})<\/TD><\/TR>/is
- <TR BGCOLOR='#DBE9E9'><TD align=left valign=top>43.<a href='joblist.cfm?JobID=94 6735&Keyword='>Word Processor<BR>(N-1286)</a></TD><TD align=left valign=top>Lega lstaff.com</TD><TD align=left valign=top>CA - Statewide</TD></TR>
- /a[^a]b/
- acb
- a\nb
-
- /a.b/
- acb
- \= Expect no match
- a\nb
-
- /a[^a]b/s
- acb
- a\nb
-
- /a.b/s
- acb
- a\nb
- /^(b+?|a){1,2}?c/
- bac
- bbac
- bbbac
- bbbbac
- bbbbbac
- /^(b+|a){1,2}?c/
- bac
- bbac
- bbbac
- bbbbac
- bbbbbac
-
- /(?!\A)x/m
- a\bx\n
- \= Expect no match
- x\nb\n
-
- /\x0{ab}/
- \0{ab}
- /(A|B)*?CD/
- CD
-
- /(A|B)*CD/
- CD
- /(?<!bar)foo/
- foo
- catfood
- arfootle
- rfoosh
- \= Expect no match
- barfoo
- towbarfoo
- /\w{3}(?<!bar)foo/
- catfood
- \= Expect no match
- foo
- barfoo
- towbarfoo
- /(?<=(foo)a)bar/
- fooabar
- \= Expect no match
- bar
- foobbar
-
- /\Aabc\z/m
- abc
- \= Expect no match
- abc\n
- qqq\nabc
- abc\nzzz
- qqq\nabc\nzzz
- "(?>.*/)foo"
- \= Expect no match
- /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/it/you/see/
- "(?>.*/)foo"
- /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo
- /(?>(\.\d\d[1-9]?))\d+/
- 1.230003938
- 1.875000282
- \= Expect no match
- 1.235
- /^((?>\w+)|(?>\s+))*$/
- now is the time for all good men to come to the aid of the party
- \= Expect no match
- this is not a line with only words and spaces!
-
- /(\d+)(\w)/
- 12345a
- 12345+
- /((?>\d+))(\w)/
- 12345a
- \= Expect no match
- 12345+
- /(?>a+)b/
- aaab
- /((?>a+)b)/
- aaab
- /(?>(a+))b/
- aaab
- /(?>b)+/
- aaabbbccc
- /(?>a+|b+|c+)*c/
- aaabbbbccccd
-
- /(a+|b+|c+)*c/
- aaabbbbccccd
- /((?>[^()]+)|\([^()]*\))+/
- ((abc(ade)ufh()()x
-
- /\(((?>[^()]+)|\([^()]+\))+\)/
- (abc)
- (abc(def)xyz)
- \= Expect no match
- ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- /a(?-i)b/i
- ab
- Ab
- \= Expect no match
- aB
- AB
-
- /(a (?x)b c)d e/
- a bcd e
- \= Expect no match
- a b cd e
- abcd e
- a bcde
-
- /(a b(?x)c d (?-x)e f)/
- a bcde f
- \= Expect no match
- abcdef
- /(a(?i)b)c/
- abc
- aBc
- \= Expect no match
- abC
- aBC
- Abc
- ABc
- ABC
- AbC
-
- /a(?i:b)c/
- abc
- aBc
- \= Expect no match
- ABC
- abC
- aBC
-
- /a(?i:b)*c/
- aBc
- aBBc
- \= Expect no match
- aBC
- aBBC
-
- /a(?=b(?i)c)\w\wd/
- abcd
- abCd
- \= Expect no match
- aBCd
- abcD
-
- /(?s-i:more.*than).*million/i
- more than million
- more than MILLION
- more \n than Million
- \= Expect no match
- MORE THAN MILLION
- more \n than \n million
- /(?:(?s-i)more.*than).*million/i
- more than million
- more than MILLION
- more \n than Million
- \= Expect no match
- MORE THAN MILLION
- more \n than \n million
-
- /(?>a(?i)b+)+c/
- abc
- aBbc
- aBBc
- \= Expect no match
- Abc
- abAb
- abbC
-
- /(?=a(?i)b)\w\wc/
- abc
- aBc
- \= Expect no match
- Ab
- abC
- aBC
-
- /(?<=a(?i)b)(\w\w)c/
- abxxc
- aBxxc
- \= Expect no match
- Abxxc
- ABxxc
- abxxC
- /^(?(?=abc)\w{3}:|\d\d)$/
- abc:
- 12
- \= Expect no match
- 123
- xyz
- /^(?(?!abc)\d\d|\w{3}:)$/
- abc:
- 12
- \= Expect no match
- 123
- xyz
-
- /(?(?<=foo)bar|cat)/
- foobar
- cat
- fcat
- focat
- \= Expect no match
- foocat
- /(?(?<!foo)cat|bar)/
- foobar
- cat
- fcat
- focat
- \= Expect no match
- foocat
- /(?>a*)*/
- a
- aa
- aaaa
-
- /(abc|)+/
- abc
- abcabc
- abcabcabc
- xyz
- /([a]*)*/
- a
- aaaaa
-
- /([ab]*)*/
- a
- b
- ababab
- aaaabcde
- bbbb
-
- /([^a]*)*/
- b
- bbbb
- aaa
-
- /([^ab]*)*/
- cccc
- abab
-
- /([a]*?)*/
- a
- aaaa
-
- /([ab]*?)*/
- a
- b
- abab
- baba
-
- /([^a]*?)*/
- b
- bbbb
- aaa
-
- /([^ab]*?)*/
- c
- cccc
- baba
-
- /(?>a*)*/
- a
- aaabcde
-
- /((?>a*))*/
- aaaaa
- aabbaa
-
- /((?>a*?))*/
- aaaaa
- aabbaa
- /(?(?=[^a-z]+[a-z]) \d{2}-[a-z]{3}-\d{2} | \d{2}-\d{2}-\d{2} ) /x
- 12-sep-98
- 12-09-98
- \= Expect no match
- sep-12-98
-
- /(?i:saturday|sunday)/
- saturday
- sunday
- Saturday
- Sunday
- SATURDAY
- SUNDAY
- SunDay
-
- /(a(?i)bc|BB)x/
- abcx
- aBCx
- bbx
- BBx
- \= Expect no match
- abcX
- aBCX
- bbX
- BBX
- /^([ab](?i)[cd]|[ef])/
- ac
- aC
- bD
- elephant
- Europe
- frog
- France
- \= Expect no match
- Africa
- /^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)/
- ab
- aBd
- xy
- xY
- zebra
- Zambesi
- \= Expect no match
- aCD
- XY
- /(?<=foo\n)^bar/m
- foo\nbar
- \= Expect no match
- bar
- baz\nbar
- /(?<=(?<!foo)bar)baz/
- barbaz
- barbarbaz
- koobarbaz
- \= Expect no match
- baz
- foobarbaz
- # The following tests are taken from the Perl 5.005 test suite; some of them
- # are compatible with 5.004, but I'd rather not have to sort them out.
- /abc/
- abc
- xabcy
- ababc
- \= Expect no match
- xbc
- axc
- abx
- /ab*c/
- abc
- /ab*bc/
- abc
- abbc
- abbbbc
- /.{1}/
- abbbbc
- /.{3,4}/
- abbbbc
- /ab{0,}bc/
- abbbbc
- /ab+bc/
- abbc
- \= Expect no match
- abc
- abq
- /ab+bc/
- abbbbc
- /ab{1,}bc/
- abbbbc
- /ab{1,3}bc/
- abbbbc
- /ab{3,4}bc/
- abbbbc
- /ab{4,5}bc/
- \= Expect no match
- abq
- abbbbc
- /ab?bc/
- abbc
- abc
- /ab{0,1}bc/
- abc
- /ab?bc/
- /ab?c/
- abc
- /ab{0,1}c/
- abc
- /^abc$/
- abc
- \= Expect no match
- abbbbc
- abcc
- /^abc/
- abcc
- /^abc$/
- /abc$/
- aabc
- aabc
- \= Expect no match
- aabcd
- /^/
- abc
- /$/
- abc
- /a.c/
- abc
- axc
- /a.*c/
- axyzc
- /a[bc]d/
- abd
- \= Expect no match
- axyzd
- abc
- /a[b-d]e/
- ace
- /a[b-d]/
- aac
- /a[-b]/
- a-
- /a[b-]/
- a-
- /a]/
- a]
- /a[]]b/
- a]b
- /a[^bc]d/
- aed
- \= Expect no match
- abd
- abd
- /a[^-b]c/
- adc
- /a[^]b]c/
- adc
- a-c
- \= Expect no match
- a]c
- /\ba\b/
- a-
- -a
- -a-
- /\by\b/
- \= Expect no match
- xy
- yz
- xyz
- /\Ba\B/
- \= Expect no match
- a-
- -a
- -a-
- /\By\b/
- xy
- /\by\B/
- yz
- /\By\B/
- xyz
- /\w/
- a
- /\W/
- -
- \= Expect no match
- a
- /a\sb/
- a b
- /a\Sb/
- a-b
- \= Expect no match
- a b
- /\d/
- 1
- /\D/
- -
- \= Expect no match
- 1
- /[\w]/
- a
- /[\W]/
- -
- \= Expect no match
- a
- /a[\s]b/
- a b
- /a[\S]b/
- a-b
- \= Expect no match
- a b
- /[\d]/
- 1
- /[\D]/
- -
- \= Expect no match
- 1
- /ab|cd/
- abc
- abcd
- /()ef/
- def
- /$b/
- /a\(b/
- a(b
- /a\(*b/
- ab
- a((b
- /a\\b/
- a\\b
- \= Expect no match
- a\b
- /((a))/
- abc
- /(a)b(c)/
- abc
- /a+b+c/
- aabbabc
- /a{1,}b{1,}c/
- aabbabc
- /a.+?c/
- abcabc
- /(a+|b)*/
- ab
- /(a+|b){0,}/
- ab
- /(a+|b)+/
- ab
- /(a+|b){1,}/
- ab
- /(a+|b)?/
- ab
- /(a+|b){0,1}/
- ab
- /[^ab]*/
- cde
- /abc/
- \= Expect no match
- b
- /a*/
- /([abc])*d/
- abbbcd
- /([abc])*bcd/
- abcd
- /a|b|c|d|e/
- e
- /(a|b|c|d|e)f/
- ef
- /abcd*efg/
- abcdefg
- /ab*/
- xabyabbbz
- xayabbbz
- /(ab|cd)e/
- abcde
- /[abhgefdc]ij/
- hij
- /^(ab|cd)e/
- /(abc|)ef/
- abcdef
- /(a|b)c*d/
- abcd
- /(ab|ab*)bc/
- abc
- /a([bc]*)c*/
- abc
- /a([bc]*)(c*d)/
- abcd
- /a([bc]+)(c*d)/
- abcd
- /a([bc]*)(c+d)/
- abcd
- /a[bcd]*dcdcde/
- adcdcde
- /a[bcd]+dcdcde/
- \= Expect no match
- abcde
- adcdcde
- /(ab|a)b*c/
- abc
- /((a)(b)c)(d)/
- abcd
- /[a-zA-Z_][a-zA-Z0-9_]*/
- alpha
- /^a(bc+|b[eh])g|.h$/
- abh
- /(bc+d$|ef*g.|h?i(j|k))/
- effgz
- ij
- reffgz
- \= Expect no match
- effg
- bcdd
- /((((((((((a))))))))))/
- a
- /(((((((((a)))))))))/
- a
- /multiple words of text/
- \= Expect no match
- aa
- uh-uh
- /multiple words/
- multiple words, yeah
- /(.*)c(.*)/
- abcde
- /\((.*), (.*)\)/
- (a, b)
- /[k]/
- /abcd/
- abcd
- /a(bc)d/
- abcd
- /a[-]?c/
- ac
- /abc/i
- ABC
- XABCY
- ABABC
- \= Expect no match
- aaxabxbaxbbx
- XBC
- AXC
- ABX
- /ab*c/i
- ABC
- /ab*bc/i
- ABC
- ABBC
- /ab*?bc/i
- ABBBBC
- /ab{0,}?bc/i
- ABBBBC
- /ab+?bc/i
- ABBC
- /ab+bc/i
- \= Expect no match
- ABC
- ABQ
- /ab{1,}bc/i
- /ab+bc/i
- ABBBBC
- /ab{1,}?bc/i
- ABBBBC
- /ab{1,3}?bc/i
- ABBBBC
- /ab{3,4}?bc/i
- ABBBBC
- /ab{4,5}?bc/i
- \= Expect no match
- ABQ
- ABBBBC
- /ab??bc/i
- ABBC
- ABC
- /ab{0,1}?bc/i
- ABC
- /ab??bc/i
- /ab??c/i
- ABC
- /ab{0,1}?c/i
- ABC
- /^abc$/i
- ABC
- \= Expect no match
- ABBBBC
- ABCC
- /^abc/i
- ABCC
- /^abc$/i
- /abc$/i
- AABC
- /^/i
- ABC
- /$/i
- ABC
- /a.c/i
- ABC
- AXC
- /a.*?c/i
- AXYZC
- /a.*c/i
- AABC
- \= Expect no match
- AXYZD
- /a[bc]d/i
- ABD
- /a[b-d]e/i
- ACE
- \= Expect no match
- ABC
- ABD
- /a[b-d]/i
- AAC
- /a[-b]/i
- A-
- /a[b-]/i
- A-
- /a]/i
- A]
- /a[]]b/i
- A]B
- /a[^bc]d/i
- AED
- /a[^-b]c/i
- ADC
- \= Expect no match
- ABD
- A-C
- /a[^]b]c/i
- ADC
- /ab|cd/i
- ABC
- ABCD
- /()ef/i
- DEF
- /$b/i
- \= Expect no match
- A]C
- B
- /a\(b/i
- A(B
- /a\(*b/i
- AB
- A((B
- /a\\b/i
- \= Expect no match
- A\=notbol
- /((a))/i
- ABC
- /(a)b(c)/i
- ABC
- /a+b+c/i
- AABBABC
- /a{1,}b{1,}c/i
- AABBABC
- /a.+?c/i
- ABCABC
- /a.*?c/i
- ABCABC
- /a.{0,5}?c/i
- ABCABC
- /(a+|b)*/i
- AB
- /(a+|b){0,}/i
- AB
- /(a+|b)+/i
- AB
- /(a+|b){1,}/i
- AB
- /(a+|b)?/i
- AB
- /(a+|b){0,1}/i
- AB
- /(a+|b){0,1}?/i
- AB
- /[^ab]*/i
- CDE
- /abc/i
- /a*/i
- /([abc])*d/i
- ABBBCD
- /([abc])*bcd/i
- ABCD
- /a|b|c|d|e/i
- E
- /(a|b|c|d|e)f/i
- EF
- /abcd*efg/i
- ABCDEFG
- /ab*/i
- XABYABBBZ
- XAYABBBZ
- /(ab|cd)e/i
- ABCDE
- /[abhgefdc]ij/i
- HIJ
- /^(ab|cd)e/i
- \= Expect no match
- ABCDE
- /(abc|)ef/i
- ABCDEF
- /(a|b)c*d/i
- ABCD
- /(ab|ab*)bc/i
- ABC
- /a([bc]*)c*/i
- ABC
- /a([bc]*)(c*d)/i
- ABCD
- /a([bc]+)(c*d)/i
- ABCD
- /a([bc]*)(c+d)/i
- ABCD
- /a[bcd]*dcdcde/i
- ADCDCDE
- /a[bcd]+dcdcde/i
- /(ab|a)b*c/i
- ABC
- /((a)(b)c)(d)/i
- ABCD
- /[a-zA-Z_][a-zA-Z0-9_]*/i
- ALPHA
- /^a(bc+|b[eh])g|.h$/i
- ABH
- /(bc+d$|ef*g.|h?i(j|k))/i
- EFFGZ
- IJ
- REFFGZ
- \= Expect no match
- ADCDCDE
- EFFG
- BCDD
- /((((((((((a))))))))))/i
- A
- /(((((((((a)))))))))/i
- A
- /(?:(?:(?:(?:(?:(?:(?:(?:(?:(a))))))))))/i
- A
- /(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))/i
- C
- /multiple words of text/i
- \= Expect no match
- AA
- UH-UH
- /multiple words/i
- MULTIPLE WORDS, YEAH
- /(.*)c(.*)/i
- ABCDE
- /\((.*), (.*)\)/i
- (A, B)
- /[k]/i
- /abcd/i
- ABCD
- /a(bc)d/i
- ABCD
- /a[-]?c/i
- AC
- /a(?!b)./
- abad
- /a(?=d)./
- abad
- /a(?=c|d)./
- abad
- /a(?:b|c|d)(.)/
- ace
- /a(?:b|c|d)*(.)/
- ace
- /a(?:b|c|d)+?(.)/
- ace
- acdbcdbe
- /a(?:b|c|d)+(.)/
- acdbcdbe
- /a(?:b|c|d){2}(.)/
- acdbcdbe
- /a(?:b|c|d){4,5}(.)/
- acdbcdbe
- /a(?:b|c|d){4,5}?(.)/
- acdbcdbe
- /((foo)|(bar))*/
- foobar
- /a(?:b|c|d){6,7}(.)/
- acdbcdbe
- /a(?:b|c|d){6,7}?(.)/
- acdbcdbe
- /a(?:b|c|d){5,6}(.)/
- acdbcdbe
- /a(?:b|c|d){5,6}?(.)/
- acdbcdbe
- /a(?:b|c|d){5,7}(.)/
- acdbcdbe
- /a(?:b|c|d){5,7}?(.)/
- acdbcdbe
- /a(?:b|(c|e){1,2}?|d)+?(.)/
- ace
- /^(.+)?B/
- AB
- /^([^a-z])|(\^)$/
- .
- /^[<>]&/
- <&OUT
- /(?:(f)(o)(o)|(b)(a)(r))*/
- foobar
- /(?<=a)b/
- ab
- \= Expect no match
- cb
- b
- /(?<!c)b/
- ab
- b
- b
- /(?:..)*a/
- aba
- /(?:..)*?a/
- aba
- /^(){3,5}/
- abc
- /^(a+)*ax/
- aax
- /^((a|b)+)*ax/
- aax
- /^((a|bc)+)*ax/
- aax
- /(a|x)*ab/
- cab
- /(a)*ab/
- cab
- /(?:(?i)a)b/
- ab
- /((?i)a)b/
- ab
- /(?:(?i)a)b/
- Ab
- /((?i)a)b/
- Ab
- /(?:(?i)a)b/
- \= Expect no match
- cb
- aB
- /((?i)a)b/
- /(?i:a)b/
- ab
- /((?i:a))b/
- ab
- /(?i:a)b/
- Ab
- /((?i:a))b/
- Ab
- /(?i:a)b/
- \= Expect no match
- aB
- aB
- /((?i:a))b/
- /(?:(?-i)a)b/i
- ab
- /((?-i)a)b/i
- ab
- /(?:(?-i)a)b/i
- aB
- /((?-i)a)b/i
- aB
- /(?:(?-i)a)b/i
- aB
- \= Expect no match
- Ab
- /((?-i)a)b/i
- /(?:(?-i)a)b/i
- aB
- /((?-i)a)b/i
- aB
- /(?:(?-i)a)b/i
- \= Expect no match
- Ab
- AB
- /((?-i)a)b/i
- /(?-i:a)b/i
- ab
- /((?-i:a))b/i
- ab
- /(?-i:a)b/i
- aB
- /((?-i:a))b/i
- aB
- /(?-i:a)b/i
- \= Expect no match
- AB
- Ab
- /((?-i:a))b/i
- /(?-i:a)b/i
- aB
- /((?-i:a))b/i
- aB
- /(?-i:a)b/i
- \= Expect no match
- Ab
- AB
- /((?-i:a))b/i
- /((?-i:a.))b/i
- \= Expect no match
- AB
- a\nB
- /((?s-i:a.))b/i
- a\nB
- /(?:c|d)(?:)(?:a(?:)(?:b)(?:b(?:))(?:b(?:)(?:b)))/
- cabbbb
- /(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))/
- caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
- /foo\w*\d{4}baz/
- foobar1234baz
- /x(~~)*(?:(?:F)?)?/
- x~~
- /^a(?#xxx){3}c/
- aaac
- /^a (?#xxx) (?#yyy) {3}c/x
- aaac
- /(?<![cd])b/
- \= Expect no match
- B\nB
- dbcb
- /(?<![cd])[ab]/
- dbaacb
- /(?<!(c|d))b/
- /(?<!(c|d))[ab]/
- dbaacb
- /(?<!cd)[ab]/
- cdaccb
- /^(?:a?b?)*$/
- \= Expect no match
- dbcb
- a--
- /((?s)^a(.))((?m)^b$)/
- a\nb\nc\n
- /((?m)^b$)/
- a\nb\nc\n
- /(?m)^b/
- a\nb\n
- /(?m)^(b)/
- a\nb\n
- /((?m)^b)/
- a\nb\n
- /\n((?m)^b)/
- a\nb\n
- /((?s).)c(?!.)/
- a\nb\nc\n
- a\nb\nc\n
- /((?s)b.)c(?!.)/
- a\nb\nc\n
- a\nb\nc\n
- /^b/
- /()^b/
- \= Expect no match
- a\nb\nc\n
- a\nb\nc\n
- /((?m)^b)/
- a\nb\nc\n
- /(?(?!a)a|b)/
- /(?(?!a)b|a)/
- a
- /(?(?=a)b|a)/
- \= Expect no match
- a
- a
- /(?(?=a)a|b)/
- a
- /(\w+:)+/
- one:
- /$(?<=^(a))/
- a
- /([\w:]+::)?(\w+)$/
- abcd
- xy:z:::abcd
- /^[^bcd]*(c+)/
- aexycd
- /(a*)b+/
- caab
- /([\w:]+::)?(\w+)$/
- abcd
- xy:z:::abcd
- \= Expect no match
- abcd:
- abcd:
- /^[^bcd]*(c+)/
- aexycd
- /(>a+)ab/
- /(?>a+)b/
- aaab
- /([[:]+)/
- a:[b]:
- /([[=]+)/
- a=[b]=
- /([[.]+)/
- a.[b].
- /((?>a+)b)/
- aaab
- /(?>(a+))b/
- aaab
- /((?>[^()]+)|\([^()]*\))+/
- ((abc(ade)ufh()()x
- /a\Z/
- \= Expect no match
- aaab
- a\nb\n
- /b\Z/
- a\nb\n
- /b\z/
- /b\Z/
- a\nb
- /b\z/
- a\nb
-
- /(?>.*)(?<=(abcd|wxyz))/
- alphabetabcd
- endingwxyz
- \= Expect no match
- a rather long string that doesn't end with one of them
- /word (?>(?:(?!otherword)[a-zA-Z0-9]+ ){0,30})otherword/
- word cat dog elephant mussel cow horse canary baboon snake shark otherword
- \= Expect no match
- word cat dog elephant mussel cow horse canary baboon snake shark
-
- /word (?>[a-zA-Z0-9]+ ){0,30}otherword/
- \= Expect no match
- word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope
- /(?<=\d{3}(?!999))foo/
- 999foo
- 123999foo
- \= Expect no match
- 123abcfoo
-
- /(?<=(?!...999)\d{3})foo/
- 999foo
- 123999foo
- \= Expect no match
- 123abcfoo
- /(?<=\d{3}(?!999)...)foo/
- 123abcfoo
- 123456foo
- \= Expect no match
- 123999foo
-
- /(?<=\d{3}...)(?<!999)foo/
- 123abcfoo
- 123456foo
- \= Expect no match
- 123999foo
- /((Z)+|A)*/
- ZABCDEFG
- /(Z()|A)*/
- ZABCDEFG
- /(Z(())|A)*/
- ZABCDEFG
- /((?>Z)+|A)*/
- ZABCDEFG
- /((?>)+|A)*/
- ZABCDEFG
- /a*/g
- abbab
- /[[:space:]]+/
- > \x09\x0a\x0c\x0d\x0b<
-
- /[[:blank:]]+/
- > \x09\x0a\x0c\x0d\x0b<
-
- /[\s]+/
- > \x09\x0a\x0c\x0d\x0b<
-
- /\s+/
- > \x09\x0a\x0c\x0d\x0b<
-
- /ab/x
- ab
- /(?!\A)x/m
- a\nxb\n
- /(?!^)x/m
- \= Expect no match
- a\nxb\n
- /abc\Qabc\Eabc/
- abcabcabc
-
- /abc\Q(*+|\Eabc/
- abc(*+|abc
- / abc\Q abc\Eabc/x
- abc abcabc
- \= Expect no match
- abcabcabc
-
- /abc#comment
- \Q#not comment
- literal\E/x
- abc#not comment\n literal
- /abc#comment
- \Q#not comment
- literal/x
- abc#not comment\n literal
- /abc#comment
- \Q#not comment
- literal\E #more comment
- /x
- abc#not comment\n literal
- /abc#comment
- \Q#not comment
- literal\E #more comment/x
- abc#not comment\n literal
- /\Qabc\$xyz\E/
- abc\\\$xyz
- /\Qabc\E\$\Qxyz\E/
- abc\$xyz
- /\Gabc/
- abc
- \= Expect no match
- xyzabc
- /\Gabc./g
- abc1abc2xyzabc3
- /abc./g
- abc1abc2xyzabc3
- /a(?x: b c )d/
- XabcdY
- \= Expect no match
- Xa b c d Y
- /((?x)x y z | a b c)/
- XabcY
- AxyzB
- /(?i)AB(?-i)C/
- XabCY
- \= Expect no match
- XabcY
- /((?i)AB(?-i)C|D)E/
- abCE
- DE
- \= Expect no match
- abcE
- abCe
- dE
- De
- /[z\Qa-d]\E]/
- z
- a
- -
- d
- ]
- \= Expect no match
- b
- /(a+)*b/
- \= Expect no match
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-
- /(?i)reg(?:ul(?:[aä]|ae)r|ex)/
- REGular
- regulaer
- Regex
- regulär
- /Åæåä[à-ÿÀ-ß]+/
- Åæåäà
- Åæåäÿ
- ÅæåäÀ
- Åæåäß
- /(?<=Z)X./
- \x84XAZXB
- /^(?(2)a|(1)(2))+$/
- 123a
- /(?<=a|bbbb)c/
- ac
- bbbbc
- /line\nbreak/
- this is a line\nbreak
- line one\nthis is a line\nbreak in the second line
- /line\nbreak/firstline
- this is a line\nbreak
- \= Expect no match
- line one\nthis is a line\nbreak in the second line
- /line\nbreak/m,firstline
- this is a line\nbreak
- \= Expect no match
- line one\nthis is a line\nbreak in the second line
- /1234/
- 123\=ps
- \= Expect no match
- a4\=ps,dfa_restart
- /1234/
- 123\=ps
- 4\=ps,dfa_restart
- /^/gm
- a\nb\nc\n
- \
-
- /(?<=C\n)^/gm
- A\nC\nC\n
- /(?s)A?B/
- AB
- aB
- /(?s)A*B/
- AB
- aB
- /(?m)A?B/
- AB
- aB
- /(?m)A*B/
- AB
- aB
- /Content-Type\x3A[^\r\n]{6,}/
- Content-Type:xxxxxyyy
- /Content-Type\x3A[^\r\n]{6,}z/
- Content-Type:xxxxxyyyz
- /Content-Type\x3A[^a]{6,}/
- Content-Type:xxxyyy
- /Content-Type\x3A[^a]{6,}z/
- Content-Type:xxxyyyz
- /^abc/Im,newline=lf
- xyz\nabc
- xyz\r\nabc
- \= Expect no match
- xyz\rabc
- xyzabc\r
- xyzabc\rpqr
- xyzabc\r\n
- xyzabc\r\npqr
- /^abc/Im,newline=crlf
- xyz\r\nabclf>
- \= Expect no match
- xyz\nabclf
- xyz\rabclf
-
- /^abc/Im,newline=cr
- xyz\rabc
- \= Expect no match
- xyz\nabc
- xyz\r\nabc
- /.*/I,newline=lf
- abc\ndef
- abc\rdef
- abc\r\ndef
- /.*/I,newline=cr
- abc\ndef
- abc\rdef
- abc\r\ndef
- /.*/I,newline=crlf
- abc\ndef
- abc\rdef
- abc\r\ndef
- /\w+(.)(.)?def/Is
- abc\ndef
- abc\rdef
- abc\r\ndef
- /\w+(.)(.)?def/s
- abc\ndef
- abc\rdef
- abc\r\ndef
- /^\w+=.*(\\\n.*)*/
- abc=xyz\\\npqr
- /^(a()*)*/
- aaaa
- /^(?:a(?:(?:))*)*/
- aaaa
- /^(a()+)+/
- aaaa
- /^(?:a(?:(?:))+)+/
- aaaa
- /(a|)*\d/
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
- \= Expect no match
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- /(?>a|)*\d/
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
- \= Expect no match
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- /(?:a|)*\d/
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
- \= Expect no match
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- /^a.b/newline=lf
- a\rb
- \= Expect no match
- a\nb
- /^a.b/newline=cr
- a\nb
- \= Expect no match
- a\rb
- /^a.b/newline=anycrlf
- a\x85b
- \= Expect no match
- a\rb
- /^a.b/newline=any
- \= Expect no match
- a\nb
- a\rb
- a\x85b
- /^abc./gmx,newline=any
- abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x85abc7 JUNK
- /abc.$/gmx,newline=any
- abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc9
- /^a\Rb/bsr=unicode
- a\nb
- a\rb
- a\r\nb
- a\x0bb
- a\x0cb
- a\x85b
- \= Expect no match
- a\n\rb
- /^a\R*b/bsr=unicode
- ab
- a\nb
- a\rb
- a\r\nb
- a\x0bb
- a\x0cb
- a\x85b
- a\n\rb
- a\n\r\x85\x0cb
- /^a\R+b/bsr=unicode
- a\nb
- a\rb
- a\r\nb
- a\x0bb
- a\x0cb
- a\x85b
- a\n\rb
- a\n\r\x85\x0cb
- \= Expect no match
- ab
-
- /^a\R{1,3}b/bsr=unicode
- a\nb
- a\n\rb
- a\n\r\x85b
- a\r\n\r\nb
- a\r\n\r\n\r\nb
- a\n\r\n\rb
- a\n\n\r\nb
- \= Expect no match
- a\n\n\n\rb
- a\r
- /.+foo/
- afoo
- \= Expect no match
- \r\nfoo
- \nfoo
- /.+foo/newline=crlf
- afoo
- \nfoo
- \= Expect no match
- \r\nfoo
- /.+foo/newline=any
- afoo
- \= Expect no match
- \nfoo
- \r\nfoo
- /.+foo/s
- afoo
- \r\nfoo
- \nfoo
- /^$/gm,newline=any
- abc\r\rxyz
- abc\n\rxyz
- \= Expect no match
- abc\r\nxyz
- /^X/m
- XABC
- \= Expect no match
- XABC\=notbol
- /(?m)^$/g,newline=any,aftertext
- abc\r\n\r\n
- /(?m)^$|^\r\n/g,newline=any,aftertext
- abc\r\n\r\n
-
- /(?m)$/g,newline=any,aftertext
- abc\r\n\r\n
- /(?|(abc)|(xyz))/
- >abc<
- >xyz<
- /(x)(?|(abc)|(xyz))(x)/
- xabcx
- xxyzx
- /(x)(?|(abc)(pqr)|(xyz))(x)/
- xabcpqrx
- xxyzx
- /(?|(abc)|(xyz))(?1)/
- abcabc
- xyzabc
- \= Expect no match
- xyzxyz
-
- /\H\h\V\v/
- X X\x0a
- X\x09X\x0b
- \= Expect no match
- \xa0 X\x0a
-
- /\H*\h+\V?\v{3,4}/
- \x09\x20\xa0X\x0a\x0b\x0c\x0d\x0a
- \x09\x20\xa0\x0a\x0b\x0c\x0d\x0a
- \x09\x20\xa0\x0a\x0b\x0c
- \= Expect no match
- \x09\x20\xa0\x0a\x0b
-
- /\H{3,4}/
- XY ABCDE
- XY PQR ST
-
- /.\h{3,4}./
- XY AB PQRS
- /\h*X\h?\H+Y\H?Z/
- >XNNNYZ
- > X NYQZ
- \= Expect no match
- >XYZ
- > X NY Z
- /\v*X\v?Y\v+Z\V*\x0a\V+\x0b\V{2,3}\x0c/
- >XY\x0aZ\x0aA\x0bNN\x0c
- >\x0a\x0dX\x0aY\x0a\x0bZZZ\x0aAAA\x0bNNN\x0c
- /.+A/newline=crlf
- \= Expect no match
- \r\nA
-
- /\nA/newline=crlf
- \r\nA
- /[\r\n]A/newline=crlf
- \r\nA
- /(\r|\n)A/newline=crlf
- \r\nA
- /a\Rb/I,bsr=anycrlf
- a\rb
- a\nb
- a\r\nb
- \= Expect no match
- a\x85b
- a\x0bb
- /a\Rb/I,bsr=unicode
- a\rb
- a\nb
- a\r\nb
- a\x85b
- a\x0bb
-
- /a\R?b/I,bsr=anycrlf
- a\rb
- a\nb
- a\r\nb
- \= Expect no match
- a\x85b
- a\x0bb
- /a\R?b/I,bsr=unicode
- a\rb
- a\nb
- a\r\nb
- a\x85b
- a\x0bb
-
- /a\R{2,4}b/I,bsr=anycrlf
- a\r\n\nb
- a\n\r\rb
- a\r\n\r\n\r\n\r\nb
- \= Expect no match
- a\x0b\x0bb
- a\x85\x85b
- /a\R{2,4}b/I,bsr=unicode
- a\r\rb
- a\n\n\nb
- a\r\n\n\r\rb
- a\x85\x85b
- a\x0b\x0bb
- \= Expect no match
- a\r\r\r\r\rb
-
- /a(?!)|\wbc/
- abc
- /a[]b/alt_bsux,allow_empty_class,match_unset_backref,dupnames
- \= Expect no match
- ab
- /a[]+b/alt_bsux,allow_empty_class,match_unset_backref,dupnames
- \= Expect no match
- ab
- /a[]*+b/alt_bsux,allow_empty_class,match_unset_backref,dupnames
- \= Expect no match
- ab
- /a[^]b/alt_bsux,allow_empty_class,match_unset_backref,dupnames
- aXb
- a\nb
- \= Expect no match
- ab
-
- /a[^]+b/alt_bsux,allow_empty_class,match_unset_backref,dupnames
- aXb
- a\nX\nXb
- \= Expect no match
- ab
- /X$/dollar_endonly
- X
- \= Expect no match
- X\n
- /X$/
- X
- X\n
- /xyz/auto_callout
- xyz
- abcxyz
- \= Expect no match
- abc
- abcxypqr
- /xyz/auto_callout,no_start_optimize
- abcxyz
- \= Expect no match
- abc
- abcxypqr
- /(*NO_START_OPT)xyz/auto_callout
- abcxyz
-
- /(?C)ab/
- ab
- ab\=callout_none
-
- /ab/auto_callout
- ab
- ab\=callout_none
- /^"((?(?=[a])[^"])|b)*"$/auto_callout
- "ab"
- "ab"\=callout_none
- /\d+X|9+Y/
- ++++123999\=ps
- ++++123999Y\=ps
- /Z(*F)/
- \= Expect no match
- Z\=ps
- ZA\=ps
-
- /Z(?!)/
- \= Expect no match
- Z\=ps
- ZA\=ps
- /dog(sbody)?/
- dogs\=ps
- dogs\=ph
-
- /dog(sbody)??/
- dogs\=ps
- dogs\=ph
- /dog|dogsbody/
- dogs\=ps
- dogs\=ph
-
- /dogsbody|dog/
- dogs\=ps
- dogs\=ph
- /Z(*F)Q|ZXY/
- Z\=ps
- \= Expect no match
- ZA\=ps
- X\=ps
- /\bthe cat\b/
- the cat\=ps
- the cat\=ph
- /dog(sbody)?/
- dogs\=ps
- body\=dfa_restart
- /dog(sbody)?/
- dogs\=ph
- body\=dfa_restart
- /abc/
- abc\=ps
- abc\=ph
- /abc\K123/
- xyzabc123pqr
-
- /(?<=abc)123/allusedtext
- xyzabc123pqr
- xyzabc12\=ps
- xyzabc12\=ph
- /\babc\b/allusedtext
- +++abc+++
- +++ab\=ps
- +++ab\=ph
- /(?=C)/g,aftertext
- ABCDECBA
- /(abc|def|xyz)/I
- terhjk;abcdaadsfe
- the quick xyz brown fox
- \= Expect no match
- thejk;adlfj aenjl;fda asdfasd ehj;kjxyasiupd
- /(abc|def|xyz)/I,no_start_optimize
- terhjk;abcdaadsfe
- the quick xyz brown fox
- \= Expect no match
- thejk;adlfj aenjl;fda asdfasd ehj;kjxyasiupd
- /abcd*/aftertext
- xxxxabcd\=ps
- xxxxabcd\=ph
- dddxxx\=dfa_restart
- xxxxabcd\=ph
- xxx\=dfa_restart
- /abcd*/i
- xxxxabcd\=ps
- xxxxabcd\=ph
- XXXXABCD\=ps
- XXXXABCD\=ph
- /abc\d*/
- xxxxabc1\=ps
- xxxxabc1\=ph
- /abc[de]*/
- xxxxabcde\=ps
- xxxxabcde\=ph
- /(?:(?1)|B)(A(*F)|C)/
- ABCD
- CCD
- \= Expect no match
- CAD
- /^(?:(?1)|B)(A(*F)|C)/
- CCD
- BCD
- \= Expect no match
- ABCD
- CAD
- BAD
- /^(?!a(*SKIP)b)/
- ac
-
- /^(?=a(*SKIP)b|ac)/
- ac
-
- /^(?=a(*THEN)b|ac)/
- ac
-
- /^(?=a(*PRUNE)b)/
- ab
- /^(?(?!a(*SKIP)b))/
- ac
- /(?<=abc)def/allusedtext
- abc\=ph
- /abc$/
- abc
- abc\=ps
- abc\=ph
- /abc$/m
- abc
- abc\n
- abc\=ph
- abc\n\=ph
- abc\=ps
- abc\n\=ps
- /abc\z/
- abc
- abc\=ps
- abc\=ph
- /abc\Z/
- abc
- abc\=ps
- abc\=ph
- /abc\b/
- abc
- abc\=ps
- abc\=ph
- /abc\B/
- abc\=ps
- abc\=ph
- \= Expect no match
- abc
- /.+/
- abc\=offset=0
- abc\=offset=1
- abc\=offset=2
- \= Bad offsets
- abc\=offset=4
- abc\=offset=-4
- \= Expect no match
- abc\=offset=3
- /^(?:a)++\w/
- aaaab
- \= Expect no match
- aaaa
- bbb
- /^(?:aa|(?:a)++\w)/
- aaaab
- aaaa
- \= Expect no match
- bbb
- /^(?:a)*+\w/
- aaaab
- bbb
- \= Expect no match
- aaaa
- /^(a)++\w/
- aaaab
- \= Expect no match
- aaaa
- bbb
- /^(a|)++\w/
- aaaab
- \= Expect no match
- aaaa
- bbb
- /(?=abc){3}abc/aftertext
- abcabcabc
- \= Expect no match
- xyz
-
- /(?=abc)+abc/aftertext
- abcabcabc
- \= Expect no match
- xyz
-
- /(?=abc)++abc/aftertext
- abcabcabc
- \= Expect no match
- xyz
-
- /(?=abc){0}xyz/
- xyz
- /(?=abc){1}xyz/
- \= Expect no match
- xyz
-
- /(?=(a))?./
- ab
- bc
-
- /(?=(a))??./
- ab
- bc
- /^(?=(a)){0}b(?1)/
- backgammon
- /^(?=(?1))?[az]([abc])d/
- abd
- zcdxx
- /^(?!a){0}\w+/
- aaaaa
- /(?<=(abc))?xyz/
- abcxyz
- pqrxyz
- /((?2))((?1))/
- abc
- /(?(R)a+|(?R)b)/
- aaaabcde
- /(?(R)a+|((?R))b)/
- aaaabcde
- /((?(R)a+|(?1)b))/
- aaaabcde
- /((?(R2)a+|(?1)b))()/
- aaaabcde
- /(?(R)a*(?1)|((?R))b)/
- aaaabcde
- /(a+)/no_auto_possess
- aaaa\=ovector=3
- aaaa\=ovector=4
- /^\R/
- \r\=ps
- \r\=ph
-
- /^\R{2,3}x/
- \r\=ps
- \r\=ph
- \r\r\=ps
- \r\r\=ph
- \r\r\r\=ps
- \r\r\r\=ph
- \r\rx
- \r\r\rx
- /^\R{2,3}?x/
- \r\=ps
- \r\=ph
- \r\r\=ps
- \r\r\=ph
- \r\r\r\=ps
- \r\r\r\=ph
- \r\rx
- \r\r\rx
-
- /^\R?x/
- \r\=ps
- \r\=ph
- x
- \rx
- /^\R+x/
- \r\=ps
- \r\=ph
- \r\n\=ps
- \r\n\=ph
- \rx
- /^a$/newline=crlf
- a\r\=ps
- a\r\=ph
- /^a$/m,newline=crlf
- a\r\=ps
- a\r\=ph
- /^(a$|a\r)/newline=crlf
- a\r\=ps
- a\r\=ph
- /^(a$|a\r)/m,newline=crlf
- a\r\=ps
- a\r\=ph
- /./newline=crlf
- \r\=ps
- \r\=ph
-
- /.{2,3}/newline=crlf
- \r\=ps
- \r\=ph
- \r\r\=ps
- \r\r\=ph
- \r\r\r\=ps
- \r\r\r\=ph
- /.{2,3}?/newline=crlf
- \r\=ps
- \r\=ph
- \r\r\=ps
- \r\r\=ph
- \r\r\r\=ps
- \r\r\r\=ph
- # Test simple validity check for restarts
- /abcdef/
- abc\=dfa_restart
- /<H((?(?!<H|F>)(.)|(?R))++)*F>/
- 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.
- /^(?>.{4})abc|^\w\w.xabcd/
- xxxxabcd
- xx\xa0xabcd
- /^(.{4}){2}+abc|^\w\w.x\w\w\w\wabcd/
- xxxxxxxxabcd
- xx\xa0xxxxxabcd
- /abcd/
- abcd\=ovector=0
- # These tests show up auto-possessification
- /[ab]*/
- aaaa
-
- /[ab]*?/
- aaaa
-
- /[ab]?/
- aaaa
-
- /[ab]??/
- aaaa
-
- /[ab]+/
- aaaa
-
- /[ab]+?/
- aaaa
-
- /[ab]{2,3}/
- aaaa
-
- /[ab]{2,3}?/
- aaaa
-
- /[ab]{2,}/
- aaaa
- /[ab]{2,}?/
- aaaa
- '\A(?:[^\"]++|\"(?:[^\"]*+|\"\")*+\")++'
- NON QUOTED \"QUOT\"\"ED\" AFTER \"NOT MATCHED
- '\A(?:[^\"]++|\"(?:[^\"]++|\"\")*+\")++'
- NON QUOTED \"QUOT\"\"ED\" AFTER \"NOT MATCHED
- /abc(?=xyz)/allusedtext
- abcxyzpqr
- abcxyzpqr\=aftertext
-
- /(?<=pqr)abc(?=xyz)/allusedtext
- xyzpqrabcxyzpqr
- xyzpqrabcxyzpqr\=aftertext
-
- /a\b/
- a.\=allusedtext
- a\=allusedtext
- /abc(?=abcde)(?=ab)/allusedtext
- abcabcdefg
- /a*?b*?/
- ab
- /(*NOTEMPTY)a*?b*?/
- ab
- ba
- cb
- /(*NOTEMPTY_ATSTART)a*?b*?/aftertext
- ab
- cdab
- /(a)(b)|(c)/
- XcX\=ovector=2,get=1,get=2,get=3,get=4,getall
- /(?<A>aa)/
- aa\=get=A
- aa\=copy=A
- /a+/no_auto_possess
- a\=ovector=2,get=1,get=2,getall
- aaa\=ovector=2,get=1,get=2,getall
- /a(b)c(d)/
- abc\=ph,copy=0,copy=1,getall
- /ab(?C" any text with spaces ")cde/B
- abcde
- 12abcde
- /^a(b)c(?C1)def/
- abcdef
- /^a(b)c(?C"AB")def/
- abcdef
- /^a(b)c(?C1)def/
- abcdef\=callout_capture
- /^a(b)c(?C{AB})def/B
- abcdef\=callout_capture
- /^(?(?C25)(?=abc)abcd|xyz)/B
- abcdefg
- xyz123
- /^(?(?C$abc$)(?=abc)abcd|xyz)/B
- abcdefg
- xyz123
- /^ab(?C'first')cd(?C"second")ef/
- abcdefg
- /(?:a(?C`code`)){3}X/
- aaaXY
- # Binary zero in callout string
- /"a(?C'x" 00 "z')b"/hex
- abcdefgh
- /(?(?!)a|b)/
- bbb
- \= Expect no match
- aaa
- /^/gm
- \n\n\n
- /^/gm,alt_circumflex
- \n\n\n
- /abc/use_offset_limit
- 1234abcde\=offset_limit=100
- 1234abcde\=offset_limit=9
- 1234abcde\=offset_limit=4
- 1234abcde\=offset_limit=4,offset=4
- \= Expect no match
- 1234abcde\=offset_limit=4,offset=5
- 1234abcde\=offset_limit=3
- /(?<=abc)/use_offset_limit
- 1234abc\=offset_limit=7
- \= Expect no match
- 1234abc\=offset_limit=6
- /abcd/null_context
- abcd\=null_context
- /()()a+/no_auto_possess
- aaa\=allcaptures
- a\=allcaptures
- /(*LIMIT_DEPTH=100)^((.)(?1)|.)$/
- \= Expect depth limit exceeded
- a[00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]
- /(*LIMIT_HEAP=0)^((.)(?1)|.)$/
- \= Expect heap limit exceeded
- a[00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]
- /(*LIMIT_HEAP=50000)^((.)(?1)|.)$/
- \= Expect success
- a[00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]
- /(02-)?[0-9]{3}-[0-9]{3}/
- 02-123-123
- /^(a(?2))(b)(?1)/
- abbab\=find_limits
- /abc/endanchored
- xyzabc
- \= Expect no match
- xyzabcdef
- \= Expect error
- xyzabc\=ph
- /abc/
- xyzabc\=endanchored
- \= Expect no match
- xyzabcdef\=endanchored
- \= Expect error
- xyzabc\=ps,endanchored
- /abc|bcd/endanchored
- xyzabcd
- \= Expect no match
- xyzabcdef
- /(*NUL)^.*/
- a\nb\x00ccc
-
- /(*NUL)^.*/s
- a\nb\x00ccc
-
- /^x/m,newline=nul
- ab\x00xy
-
- /'#comment' 0d 0a 00 '^x\' 0a 'y'/x,newline=nul,hex
- x\nyz
-
- /(*NUL)^X\NY/
- X\nY
- X\rY
- \= Expect no match
- X\x00Y
- /(?<=abc|)/
- abcde\=aftertext
-
- /(?<=|abc)/
- abcde\=aftertext
- /(?<=abc|)/endanchored
- abcde\=aftertext
-
- /(?<=|abc)/endanchored
- abcde\=aftertext
- /(*LIMIT_MATCH=100).*(?![|H]?.*(?![|H]?););.*(?![|H]?.*(?![|H]?););\x00\x00\x00\x00\x00\x00\x00(?!(?!(?!(?!(?!(?!(?!(?!(?!(?!(?!(?!(?!(?!(?!(?!(?!(?!(?!(?!(?!(?!(?!(?!(?!(?!(?!(?!(?!(?!(?!(?!(?!(?![|);)?.*(![|H]?);)?.*(?![|H]?);)?.*(?![|H]?);)?.*(?![|H]););![|H]?););[|H]?);|H]?);)\x00\x00\x00\x00\x00\x00H]?););?![|H]?);)?.*(?![|H]?););[||H]?);)?.*(?![|H]?););[|H]?);(?![|H]?););![|H]?););[|H]?);|H]?);)?.*(?![|H]?););;[\x00\x00\x00\x00\x00\x00\x00![|H]?););![|H]?););[|H]?);|H]?);)?.*(?![|H]?););/no_dotstar_anchor
- \= Expect limit exceeded
- .*(?![|H]?.*(?![|H]?););.*(?![|H]?.*(?![|H]?););\x00\x00\x00\x00\x00\x00\x00(?!(?!(?!(?!(?!(?!(?!(?!(?!(?!(?!(?!(?!(?!(?!(?!(?!(?!(?!(?!(?!(?!(?!(?!(?!(?!(?!(?!(?!(?!(?!(?!(?!(?![|);)?.*(![|H]?);)?.*(?![|H]?);)?.*(?![|H]?);)?.*(?![|H]););![|H]?););[|H]?);|H]?);)\x00\x00\x00\x00\x00\x00H]?););?![|H]?);)?.*(?![|H]?););[||H]?);)?.*(?![|H]?););[|H]?);(?![|H]?););![|H]?););[|H]?);|H]?);)?.*(?![|H]?););;[\x00\x00\x00\x00\x00\x00\x00![|H]?););![|H]?););[|H]?);|H]?);)?.*(?![|H]?););
- /\n/firstline
- xyz\nabc
- /\nabc/firstline
- xyz\nabc
- /\x{0a}abc/firstline,newline=crlf
- \= Expect no match
- xyz\r\nabc
- /[abc]/firstline
- \= Expect no match
- \na
-
- /foobar/
- the foobar thing\=copy_matched_subject
- the foobar thing\=copy_matched_subject,zero_terminate
- /foobar/g
- the foobar thing foobar again\=copy_matched_subject
- /(?(VERSION>=0)^B0W)/
- B0W-W0W
- \= Expect no match
- 0
- /(?(VERSION>=1000)^B0W|W0W)/
- B0W-W0W
- \= Expect no match
- 0
- /(?<=pqr)abc(?=xyz)/
- 123pqrabcxy\=ps,allusedtext
- 123pqrabcxyz\=ps,allusedtext
- /(?>a+b)/
- aaaa\=ps
- aaaab\=ps
-
- /(abc)(?1)/
- abca\=ps
- abcabc\=ps
- /(?(?=abc).*|Z)/
- ab\=ps
- abcxyz\=ps
- /(abc)++x/
- abcab\=ps
- abc\=ps
- ab\=ps
- abcx
- /\z/
- abc\=ph
- abc\=ps
-
- /\Z/
- abc\=ph
- abc\=ps
- abc\n\=ph
- abc\n\=ps
- /c*+(?<=[bc])/
- abc\=ph
- ab\=ph
- abc\=ps
- ab\=ps
- /c++(?<=[bc])/
- abc\=ph
- ab\=ph
- /(?<=(?=.(?<=x)))/
- abx
- ab\=ph
- bxyz
- xyz
- /(?![ab]).*/
- ab\=ph
- /c*+/
- ab\=ph,offset=2
- # End of testinput6
|