xregexp.js 227 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652
  1. (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.XRegExp = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
  2. /*!
  3. * XRegExp.build 3.2.0
  4. * <xregexp.com>
  5. * Steven Levithan (c) 2012-2017 MIT License
  6. * Inspired by Lea Verou's RegExp.create <lea.verou.me>
  7. */
  8. module.exports = function(XRegExp) {
  9. 'use strict';
  10. var REGEX_DATA = 'xregexp';
  11. var subParts = /(\()(?!\?)|\\([1-9]\d*)|\\[\s\S]|\[(?:[^\\\]]|\\[\s\S])*\]/g;
  12. var parts = XRegExp.union([/\({{([\w$]+)}}\)|{{([\w$]+)}}/, subParts], 'g', {
  13. conjunction: 'or'
  14. });
  15. /**
  16. * Strips a leading `^` and trailing unescaped `$`, if both are present.
  17. *
  18. * @private
  19. * @param {String} pattern Pattern to process.
  20. * @returns {String} Pattern with edge anchors removed.
  21. */
  22. function deanchor(pattern) {
  23. // Allow any number of empty noncapturing groups before/after anchors, because regexes
  24. // built/generated by XRegExp sometimes include them
  25. var leadingAnchor = /^(?:\(\?:\))*\^/;
  26. var trailingAnchor = /\$(?:\(\?:\))*$/;
  27. if (
  28. leadingAnchor.test(pattern) &&
  29. trailingAnchor.test(pattern) &&
  30. // Ensure that the trailing `$` isn't escaped
  31. trailingAnchor.test(pattern.replace(/\\[\s\S]/g, ''))
  32. ) {
  33. return pattern.replace(leadingAnchor, '').replace(trailingAnchor, '');
  34. }
  35. return pattern;
  36. }
  37. /**
  38. * Converts the provided value to an XRegExp. Native RegExp flags are not preserved.
  39. *
  40. * @private
  41. * @param {String|RegExp} value Value to convert.
  42. * @param {Boolean} [addFlagX] Whether to apply the `x` flag in cases when `value` is not
  43. * already a regex generated by XRegExp
  44. * @returns {RegExp} XRegExp object with XRegExp syntax applied.
  45. */
  46. function asXRegExp(value, addFlagX) {
  47. var flags = addFlagX ? 'x' : '';
  48. return XRegExp.isRegExp(value) ?
  49. (value[REGEX_DATA] && value[REGEX_DATA].captureNames ?
  50. // Don't recompile, to preserve capture names
  51. value :
  52. // Recompile as XRegExp
  53. XRegExp(value.source, flags)
  54. ) :
  55. // Compile string as XRegExp
  56. XRegExp(value, flags);
  57. }
  58. /**
  59. * Builds regexes using named subpatterns, for readability and pattern reuse. Backreferences in
  60. * the outer pattern and provided subpatterns are automatically renumbered to work correctly.
  61. * Native flags used by provided subpatterns are ignored in favor of the `flags` argument.
  62. *
  63. * @memberOf XRegExp
  64. * @param {String} pattern XRegExp pattern using `{{name}}` for embedded subpatterns. Allows
  65. * `({{name}})` as shorthand for `(?<name>{{name}})`. Patterns cannot be embedded within
  66. * character classes.
  67. * @param {Object} subs Lookup object for named subpatterns. Values can be strings or regexes. A
  68. * leading `^` and trailing unescaped `$` are stripped from subpatterns, if both are present.
  69. * @param {String} [flags] Any combination of XRegExp flags.
  70. * @returns {RegExp} Regex with interpolated subpatterns.
  71. * @example
  72. *
  73. * var time = XRegExp.build('(?x)^ {{hours}} ({{minutes}}) $', {
  74. * hours: XRegExp.build('{{h12}} : | {{h24}}', {
  75. * h12: /1[0-2]|0?[1-9]/,
  76. * h24: /2[0-3]|[01][0-9]/
  77. * }, 'x'),
  78. * minutes: /^[0-5][0-9]$/
  79. * });
  80. * time.test('10:59'); // -> true
  81. * XRegExp.exec('10:59', time).minutes; // -> '59'
  82. */
  83. XRegExp.build = function(pattern, subs, flags) {
  84. flags = flags || '';
  85. // Used with `asXRegExp` calls for `pattern` and subpatterns in `subs`, to work around how
  86. // some browsers convert `RegExp('\n')` to a regex that contains the literal characters `\`
  87. // and `n`. See more details at <https://github.com/slevithan/xregexp/pull/163>.
  88. var addFlagX = flags.indexOf('x') > -1;
  89. var inlineFlags = /^\(\?([\w$]+)\)/.exec(pattern);
  90. // Add flags within a leading mode modifier to the overall pattern's flags
  91. if (inlineFlags) {
  92. flags = XRegExp._clipDuplicates(flags + inlineFlags[1]);
  93. }
  94. var data = {};
  95. for (var p in subs) {
  96. if (subs.hasOwnProperty(p)) {
  97. // Passing to XRegExp enables extended syntax and ensures independent validity,
  98. // lest an unescaped `(`, `)`, `[`, or trailing `\` breaks the `(?:)` wrapper. For
  99. // subpatterns provided as native regexes, it dies on octals and adds the property
  100. // used to hold extended regex instance data, for simplicity.
  101. var sub = asXRegExp(subs[p], addFlagX);
  102. data[p] = {
  103. // Deanchoring allows embedding independently useful anchored regexes. If you
  104. // really need to keep your anchors, double them (i.e., `^^...$$`).
  105. pattern: deanchor(sub.source),
  106. names: sub[REGEX_DATA].captureNames || []
  107. };
  108. }
  109. }
  110. // Passing to XRegExp dies on octals and ensures the outer pattern is independently valid;
  111. // helps keep this simple. Named captures will be put back.
  112. var patternAsRegex = asXRegExp(pattern, addFlagX);
  113. // 'Caps' is short for 'captures'
  114. var numCaps = 0;
  115. var numPriorCaps;
  116. var numOuterCaps = 0;
  117. var outerCapsMap = [0];
  118. var outerCapNames = patternAsRegex[REGEX_DATA].captureNames || [];
  119. var output = patternAsRegex.source.replace(parts, function($0, $1, $2, $3, $4) {
  120. var subName = $1 || $2;
  121. var capName;
  122. var intro;
  123. var localCapIndex;
  124. // Named subpattern
  125. if (subName) {
  126. if (!data.hasOwnProperty(subName)) {
  127. throw new ReferenceError('Undefined property ' + $0);
  128. }
  129. // Named subpattern was wrapped in a capturing group
  130. if ($1) {
  131. capName = outerCapNames[numOuterCaps];
  132. outerCapsMap[++numOuterCaps] = ++numCaps;
  133. // If it's a named group, preserve the name. Otherwise, use the subpattern name
  134. // as the capture name
  135. intro = '(?<' + (capName || subName) + '>';
  136. } else {
  137. intro = '(?:';
  138. }
  139. numPriorCaps = numCaps;
  140. return intro + data[subName].pattern.replace(subParts, function(match, paren, backref) {
  141. // Capturing group
  142. if (paren) {
  143. capName = data[subName].names[numCaps - numPriorCaps];
  144. ++numCaps;
  145. // If the current capture has a name, preserve the name
  146. if (capName) {
  147. return '(?<' + capName + '>';
  148. }
  149. // Backreference
  150. } else if (backref) {
  151. localCapIndex = +backref - 1;
  152. // Rewrite the backreference
  153. return data[subName].names[localCapIndex] ?
  154. // Need to preserve the backreference name in case using flag `n`
  155. '\\k<' + data[subName].names[localCapIndex] + '>' :
  156. '\\' + (+backref + numPriorCaps);
  157. }
  158. return match;
  159. }) + ')';
  160. }
  161. // Capturing group
  162. if ($3) {
  163. capName = outerCapNames[numOuterCaps];
  164. outerCapsMap[++numOuterCaps] = ++numCaps;
  165. // If the current capture has a name, preserve the name
  166. if (capName) {
  167. return '(?<' + capName + '>';
  168. }
  169. // Backreference
  170. } else if ($4) {
  171. localCapIndex = +$4 - 1;
  172. // Rewrite the backreference
  173. return outerCapNames[localCapIndex] ?
  174. // Need to preserve the backreference name in case using flag `n`
  175. '\\k<' + outerCapNames[localCapIndex] + '>' :
  176. '\\' + outerCapsMap[+$4];
  177. }
  178. return $0;
  179. });
  180. return XRegExp(output, flags);
  181. };
  182. };
  183. },{}],2:[function(require,module,exports){
  184. /*!
  185. * XRegExp.matchRecursive 3.2.0
  186. * <xregexp.com>
  187. * Steven Levithan (c) 2009-2017 MIT License
  188. */
  189. module.exports = function(XRegExp) {
  190. 'use strict';
  191. /**
  192. * Returns a match detail object composed of the provided values.
  193. *
  194. * @private
  195. */
  196. function row(name, value, start, end) {
  197. return {
  198. name: name,
  199. value: value,
  200. start: start,
  201. end: end
  202. };
  203. }
  204. /**
  205. * Returns an array of match strings between outermost left and right delimiters, or an array of
  206. * objects with detailed match parts and position data. An error is thrown if delimiters are
  207. * unbalanced within the data.
  208. *
  209. * @memberOf XRegExp
  210. * @param {String} str String to search.
  211. * @param {String} left Left delimiter as an XRegExp pattern.
  212. * @param {String} right Right delimiter as an XRegExp pattern.
  213. * @param {String} [flags] Any native or XRegExp flags, used for the left and right delimiters.
  214. * @param {Object} [options] Lets you specify `valueNames` and `escapeChar` options.
  215. * @returns {Array} Array of matches, or an empty array.
  216. * @example
  217. *
  218. * // Basic usage
  219. * var str = '(t((e))s)t()(ing)';
  220. * XRegExp.matchRecursive(str, '\\(', '\\)', 'g');
  221. * // -> ['t((e))s', '', 'ing']
  222. *
  223. * // Extended information mode with valueNames
  224. * str = 'Here is <div> <div>an</div></div> example';
  225. * XRegExp.matchRecursive(str, '<div\\s*>', '</div>', 'gi', {
  226. * valueNames: ['between', 'left', 'match', 'right']
  227. * });
  228. * // -> [
  229. * // {name: 'between', value: 'Here is ', start: 0, end: 8},
  230. * // {name: 'left', value: '<div>', start: 8, end: 13},
  231. * // {name: 'match', value: ' <div>an</div>', start: 13, end: 27},
  232. * // {name: 'right', value: '</div>', start: 27, end: 33},
  233. * // {name: 'between', value: ' example', start: 33, end: 41}
  234. * // ]
  235. *
  236. * // Omitting unneeded parts with null valueNames, and using escapeChar
  237. * str = '...{1}.\\{{function(x,y){return {y:x}}}';
  238. * XRegExp.matchRecursive(str, '{', '}', 'g', {
  239. * valueNames: ['literal', null, 'value', null],
  240. * escapeChar: '\\'
  241. * });
  242. * // -> [
  243. * // {name: 'literal', value: '...', start: 0, end: 3},
  244. * // {name: 'value', value: '1', start: 4, end: 5},
  245. * // {name: 'literal', value: '.\\{', start: 6, end: 9},
  246. * // {name: 'value', value: 'function(x,y){return {y:x}}', start: 10, end: 37}
  247. * // ]
  248. *
  249. * // Sticky mode via flag y
  250. * str = '<1><<<2>>><3>4<5>';
  251. * XRegExp.matchRecursive(str, '<', '>', 'gy');
  252. * // -> ['1', '<<2>>', '3']
  253. */
  254. XRegExp.matchRecursive = function(str, left, right, flags, options) {
  255. flags = flags || '';
  256. options = options || {};
  257. var global = flags.indexOf('g') > -1;
  258. var sticky = flags.indexOf('y') > -1;
  259. // Flag `y` is controlled internally
  260. var basicFlags = flags.replace(/y/g, '');
  261. var escapeChar = options.escapeChar;
  262. var vN = options.valueNames;
  263. var output = [];
  264. var openTokens = 0;
  265. var delimStart = 0;
  266. var delimEnd = 0;
  267. var lastOuterEnd = 0;
  268. var outerStart;
  269. var innerStart;
  270. var leftMatch;
  271. var rightMatch;
  272. var esc;
  273. left = XRegExp(left, basicFlags);
  274. right = XRegExp(right, basicFlags);
  275. if (escapeChar) {
  276. if (escapeChar.length > 1) {
  277. throw new Error('Cannot use more than one escape character');
  278. }
  279. escapeChar = XRegExp.escape(escapeChar);
  280. // Example of concatenated `esc` regex:
  281. // `escapeChar`: '%'
  282. // `left`: '<'
  283. // `right`: '>'
  284. // Regex is: /(?:%[\S\s]|(?:(?!<|>)[^%])+)+/
  285. esc = new RegExp(
  286. '(?:' + escapeChar + '[\\S\\s]|(?:(?!' +
  287. // Using `XRegExp.union` safely rewrites backreferences in `left` and `right`.
  288. // Intentionally not passing `basicFlags` to `XRegExp.union` since any syntax
  289. // transformation resulting from those flags was already applied to `left` and
  290. // `right` when they were passed through the XRegExp constructor above.
  291. XRegExp.union([left, right], '', {conjunction: 'or'}).source +
  292. ')[^' + escapeChar + '])+)+',
  293. // Flags `gy` not needed here
  294. flags.replace(/[^imu]+/g, '')
  295. );
  296. }
  297. while (true) {
  298. // If using an escape character, advance to the delimiter's next starting position,
  299. // skipping any escaped characters in between
  300. if (escapeChar) {
  301. delimEnd += (XRegExp.exec(str, esc, delimEnd, 'sticky') || [''])[0].length;
  302. }
  303. leftMatch = XRegExp.exec(str, left, delimEnd);
  304. rightMatch = XRegExp.exec(str, right, delimEnd);
  305. // Keep the leftmost match only
  306. if (leftMatch && rightMatch) {
  307. if (leftMatch.index <= rightMatch.index) {
  308. rightMatch = null;
  309. } else {
  310. leftMatch = null;
  311. }
  312. }
  313. // Paths (LM: leftMatch, RM: rightMatch, OT: openTokens):
  314. // LM | RM | OT | Result
  315. // 1 | 0 | 1 | loop
  316. // 1 | 0 | 0 | loop
  317. // 0 | 1 | 1 | loop
  318. // 0 | 1 | 0 | throw
  319. // 0 | 0 | 1 | throw
  320. // 0 | 0 | 0 | break
  321. // The paths above don't include the sticky mode special case. The loop ends after the
  322. // first completed match if not `global`.
  323. if (leftMatch || rightMatch) {
  324. delimStart = (leftMatch || rightMatch).index;
  325. delimEnd = delimStart + (leftMatch || rightMatch)[0].length;
  326. } else if (!openTokens) {
  327. break;
  328. }
  329. if (sticky && !openTokens && delimStart > lastOuterEnd) {
  330. break;
  331. }
  332. if (leftMatch) {
  333. if (!openTokens) {
  334. outerStart = delimStart;
  335. innerStart = delimEnd;
  336. }
  337. ++openTokens;
  338. } else if (rightMatch && openTokens) {
  339. if (!--openTokens) {
  340. if (vN) {
  341. if (vN[0] && outerStart > lastOuterEnd) {
  342. output.push(row(vN[0], str.slice(lastOuterEnd, outerStart), lastOuterEnd, outerStart));
  343. }
  344. if (vN[1]) {
  345. output.push(row(vN[1], str.slice(outerStart, innerStart), outerStart, innerStart));
  346. }
  347. if (vN[2]) {
  348. output.push(row(vN[2], str.slice(innerStart, delimStart), innerStart, delimStart));
  349. }
  350. if (vN[3]) {
  351. output.push(row(vN[3], str.slice(delimStart, delimEnd), delimStart, delimEnd));
  352. }
  353. } else {
  354. output.push(str.slice(innerStart, delimStart));
  355. }
  356. lastOuterEnd = delimEnd;
  357. if (!global) {
  358. break;
  359. }
  360. }
  361. } else {
  362. throw new Error('Unbalanced delimiter found in string');
  363. }
  364. // If the delimiter matched an empty string, avoid an infinite loop
  365. if (delimStart === delimEnd) {
  366. ++delimEnd;
  367. }
  368. }
  369. if (global && !sticky && vN && vN[0] && str.length > lastOuterEnd) {
  370. output.push(row(vN[0], str.slice(lastOuterEnd), lastOuterEnd, str.length));
  371. }
  372. return output;
  373. };
  374. };
  375. },{}],3:[function(require,module,exports){
  376. /*!
  377. * XRegExp Unicode Base 3.2.0
  378. * <xregexp.com>
  379. * Steven Levithan (c) 2008-2017 MIT License
  380. */
  381. module.exports = function(XRegExp) {
  382. 'use strict';
  383. /**
  384. * Adds base support for Unicode matching:
  385. * - Adds syntax `\p{..}` for matching Unicode tokens. Tokens can be inverted using `\P{..}` or
  386. * `\p{^..}`. Token names ignore case, spaces, hyphens, and underscores. You can omit the
  387. * braces for token names that are a single letter (e.g. `\pL` or `PL`).
  388. * - Adds flag A (astral), which enables 21-bit Unicode support.
  389. * - Adds the `XRegExp.addUnicodeData` method used by other addons to provide character data.
  390. *
  391. * Unicode Base relies on externally provided Unicode character data. Official addons are
  392. * available to provide data for Unicode categories, scripts, blocks, and properties.
  393. *
  394. * @requires XRegExp
  395. */
  396. // ==--------------------------==
  397. // Private stuff
  398. // ==--------------------------==
  399. // Storage for Unicode data
  400. var unicode = {};
  401. // Reuse utils
  402. var dec = XRegExp._dec;
  403. var hex = XRegExp._hex;
  404. var pad4 = XRegExp._pad4;
  405. // Generates a token lookup name: lowercase, with hyphens, spaces, and underscores removed
  406. function normalize(name) {
  407. return name.replace(/[- _]+/g, '').toLowerCase();
  408. }
  409. // Gets the decimal code of a literal code unit, \xHH, \uHHHH, or a backslash-escaped literal
  410. function charCode(chr) {
  411. var esc = /^\\[xu](.+)/.exec(chr);
  412. return esc ?
  413. dec(esc[1]) :
  414. chr.charCodeAt(chr.charAt(0) === '\\' ? 1 : 0);
  415. }
  416. // Inverts a list of ordered BMP characters and ranges
  417. function invertBmp(range) {
  418. var output = '';
  419. var lastEnd = -1;
  420. XRegExp.forEach(
  421. range,
  422. /(\\x..|\\u....|\\?[\s\S])(?:-(\\x..|\\u....|\\?[\s\S]))?/,
  423. function(m) {
  424. var start = charCode(m[1]);
  425. if (start > (lastEnd + 1)) {
  426. output += '\\u' + pad4(hex(lastEnd + 1));
  427. if (start > (lastEnd + 2)) {
  428. output += '-\\u' + pad4(hex(start - 1));
  429. }
  430. }
  431. lastEnd = charCode(m[2] || m[1]);
  432. }
  433. );
  434. if (lastEnd < 0xFFFF) {
  435. output += '\\u' + pad4(hex(lastEnd + 1));
  436. if (lastEnd < 0xFFFE) {
  437. output += '-\\uFFFF';
  438. }
  439. }
  440. return output;
  441. }
  442. // Generates an inverted BMP range on first use
  443. function cacheInvertedBmp(slug) {
  444. var prop = 'b!';
  445. return (
  446. unicode[slug][prop] ||
  447. (unicode[slug][prop] = invertBmp(unicode[slug].bmp))
  448. );
  449. }
  450. // Combines and optionally negates BMP and astral data
  451. function buildAstral(slug, isNegated) {
  452. var item = unicode[slug];
  453. var combined = '';
  454. if (item.bmp && !item.isBmpLast) {
  455. combined = '[' + item.bmp + ']' + (item.astral ? '|' : '');
  456. }
  457. if (item.astral) {
  458. combined += item.astral;
  459. }
  460. if (item.isBmpLast && item.bmp) {
  461. combined += (item.astral ? '|' : '') + '[' + item.bmp + ']';
  462. }
  463. // Astral Unicode tokens always match a code point, never a code unit
  464. return isNegated ?
  465. '(?:(?!' + combined + ')(?:[\uD800-\uDBFF][\uDC00-\uDFFF]|[\0-\uFFFF]))' :
  466. '(?:' + combined + ')';
  467. }
  468. // Builds a complete astral pattern on first use
  469. function cacheAstral(slug, isNegated) {
  470. var prop = isNegated ? 'a!' : 'a=';
  471. return (
  472. unicode[slug][prop] ||
  473. (unicode[slug][prop] = buildAstral(slug, isNegated))
  474. );
  475. }
  476. // ==--------------------------==
  477. // Core functionality
  478. // ==--------------------------==
  479. /*
  480. * Add astral mode (flag A) and Unicode token syntax: `\p{..}`, `\P{..}`, `\p{^..}`, `\pC`.
  481. */
  482. XRegExp.addToken(
  483. // Use `*` instead of `+` to avoid capturing `^` as the token name in `\p{^}`
  484. /\\([pP])(?:{(\^?)([^}]*)}|([A-Za-z]))/,
  485. function(match, scope, flags) {
  486. var ERR_DOUBLE_NEG = 'Invalid double negation ';
  487. var ERR_UNKNOWN_NAME = 'Unknown Unicode token ';
  488. var ERR_UNKNOWN_REF = 'Unicode token missing data ';
  489. var ERR_ASTRAL_ONLY = 'Astral mode required for Unicode token ';
  490. var ERR_ASTRAL_IN_CLASS = 'Astral mode does not support Unicode tokens within character classes';
  491. // Negated via \P{..} or \p{^..}
  492. var isNegated = match[1] === 'P' || !!match[2];
  493. // Switch from BMP (0-FFFF) to astral (0-10FFFF) mode via flag A
  494. var isAstralMode = flags.indexOf('A') > -1;
  495. // Token lookup name. Check `[4]` first to avoid passing `undefined` via `\p{}`
  496. var slug = normalize(match[4] || match[3]);
  497. // Token data object
  498. var item = unicode[slug];
  499. if (match[1] === 'P' && match[2]) {
  500. throw new SyntaxError(ERR_DOUBLE_NEG + match[0]);
  501. }
  502. if (!unicode.hasOwnProperty(slug)) {
  503. throw new SyntaxError(ERR_UNKNOWN_NAME + match[0]);
  504. }
  505. // Switch to the negated form of the referenced Unicode token
  506. if (item.inverseOf) {
  507. slug = normalize(item.inverseOf);
  508. if (!unicode.hasOwnProperty(slug)) {
  509. throw new ReferenceError(ERR_UNKNOWN_REF + match[0] + ' -> ' + item.inverseOf);
  510. }
  511. item = unicode[slug];
  512. isNegated = !isNegated;
  513. }
  514. if (!(item.bmp || isAstralMode)) {
  515. throw new SyntaxError(ERR_ASTRAL_ONLY + match[0]);
  516. }
  517. if (isAstralMode) {
  518. if (scope === 'class') {
  519. throw new SyntaxError(ERR_ASTRAL_IN_CLASS);
  520. }
  521. return cacheAstral(slug, isNegated);
  522. }
  523. return scope === 'class' ?
  524. (isNegated ? cacheInvertedBmp(slug) : item.bmp) :
  525. (isNegated ? '[^' : '[') + item.bmp + ']';
  526. },
  527. {
  528. scope: 'all',
  529. optionalFlags: 'A',
  530. leadChar: '\\'
  531. }
  532. );
  533. /**
  534. * Adds to the list of Unicode tokens that XRegExp regexes can match via `\p` or `\P`.
  535. *
  536. * @memberOf XRegExp
  537. * @param {Array} data Objects with named character ranges. Each object may have properties
  538. * `name`, `alias`, `isBmpLast`, `inverseOf`, `bmp`, and `astral`. All but `name` are
  539. * optional, although one of `bmp` or `astral` is required (unless `inverseOf` is set). If
  540. * `astral` is absent, the `bmp` data is used for BMP and astral modes. If `bmp` is absent,
  541. * the name errors in BMP mode but works in astral mode. If both `bmp` and `astral` are
  542. * provided, the `bmp` data only is used in BMP mode, and the combination of `bmp` and
  543. * `astral` data is used in astral mode. `isBmpLast` is needed when a token matches orphan
  544. * high surrogates *and* uses surrogate pairs to match astral code points. The `bmp` and
  545. * `astral` data should be a combination of literal characters and `\xHH` or `\uHHHH` escape
  546. * sequences, with hyphens to create ranges. Any regex metacharacters in the data should be
  547. * escaped, apart from range-creating hyphens. The `astral` data can additionally use
  548. * character classes and alternation, and should use surrogate pairs to represent astral code
  549. * points. `inverseOf` can be used to avoid duplicating character data if a Unicode token is
  550. * defined as the exact inverse of another token.
  551. * @example
  552. *
  553. * // Basic use
  554. * XRegExp.addUnicodeData([{
  555. * name: 'XDigit',
  556. * alias: 'Hexadecimal',
  557. * bmp: '0-9A-Fa-f'
  558. * }]);
  559. * XRegExp('\\p{XDigit}:\\p{Hexadecimal}+').test('0:3D'); // -> true
  560. */
  561. XRegExp.addUnicodeData = function(data) {
  562. var ERR_NO_NAME = 'Unicode token requires name';
  563. var ERR_NO_DATA = 'Unicode token has no character data ';
  564. var item;
  565. for (var i = 0; i < data.length; ++i) {
  566. item = data[i];
  567. if (!item.name) {
  568. throw new Error(ERR_NO_NAME);
  569. }
  570. if (!(item.inverseOf || item.bmp || item.astral)) {
  571. throw new Error(ERR_NO_DATA + item.name);
  572. }
  573. unicode[normalize(item.name)] = item;
  574. if (item.alias) {
  575. unicode[normalize(item.alias)] = item;
  576. }
  577. }
  578. // Reset the pattern cache used by the `XRegExp` constructor, since the same pattern and
  579. // flags might now produce different results
  580. XRegExp.cache.flush('patterns');
  581. };
  582. /**
  583. * @ignore
  584. *
  585. * Return a reference to the internal Unicode definition structure for the given Unicode
  586. * Property if the given name is a legal Unicode Property for use in XRegExp `\p` or `\P` regex
  587. * constructs.
  588. *
  589. * @memberOf XRegExp
  590. * @param {String} name Name by which the Unicode Property may be recognized (case-insensitive),
  591. * e.g. `'N'` or `'Number'`. The given name is matched against all registered Unicode
  592. * Properties and Property Aliases.
  593. * @returns {Object} Reference to definition structure when the name matches a Unicode Property.
  594. *
  595. * @note
  596. * For more info on Unicode Properties, see also http://unicode.org/reports/tr18/#Categories.
  597. *
  598. * @note
  599. * This method is *not* part of the officially documented API and may change or be removed in
  600. * the future. It is meant for userland code that wishes to reuse the (large) internal Unicode
  601. * structures set up by XRegExp.
  602. */
  603. XRegExp._getUnicodeProperty = function(name) {
  604. var slug = normalize(name);
  605. return unicode[slug];
  606. };
  607. };
  608. },{}],4:[function(require,module,exports){
  609. /*!
  610. * XRegExp Unicode Blocks 3.2.0
  611. * <xregexp.com>
  612. * Steven Levithan (c) 2010-2017 MIT License
  613. * Unicode data by Mathias Bynens <mathiasbynens.be>
  614. */
  615. module.exports = function(XRegExp) {
  616. 'use strict';
  617. /**
  618. * Adds support for all Unicode blocks. Block names use the prefix 'In'. E.g.,
  619. * `\p{InBasicLatin}`. Token names are case insensitive, and any spaces, hyphens, and
  620. * underscores are ignored.
  621. *
  622. * Uses Unicode 9.0.0.
  623. *
  624. * @requires XRegExp, Unicode Base
  625. */
  626. if (!XRegExp.addUnicodeData) {
  627. throw new ReferenceError('Unicode Base must be loaded before Unicode Blocks');
  628. }
  629. XRegExp.addUnicodeData([
  630. {
  631. name: 'InAdlam',
  632. astral: '\uD83A[\uDD00-\uDD5F]'
  633. },
  634. {
  635. name: 'InAegean_Numbers',
  636. astral: '\uD800[\uDD00-\uDD3F]'
  637. },
  638. {
  639. name: 'InAhom',
  640. astral: '\uD805[\uDF00-\uDF3F]'
  641. },
  642. {
  643. name: 'InAlchemical_Symbols',
  644. astral: '\uD83D[\uDF00-\uDF7F]'
  645. },
  646. {
  647. name: 'InAlphabetic_Presentation_Forms',
  648. bmp: '\uFB00-\uFB4F'
  649. },
  650. {
  651. name: 'InAnatolian_Hieroglyphs',
  652. astral: '\uD811[\uDC00-\uDE7F]'
  653. },
  654. {
  655. name: 'InAncient_Greek_Musical_Notation',
  656. astral: '\uD834[\uDE00-\uDE4F]'
  657. },
  658. {
  659. name: 'InAncient_Greek_Numbers',
  660. astral: '\uD800[\uDD40-\uDD8F]'
  661. },
  662. {
  663. name: 'InAncient_Symbols',
  664. astral: '\uD800[\uDD90-\uDDCF]'
  665. },
  666. {
  667. name: 'InArabic',
  668. bmp: '\u0600-\u06FF'
  669. },
  670. {
  671. name: 'InArabic_Extended_A',
  672. bmp: '\u08A0-\u08FF'
  673. },
  674. {
  675. name: 'InArabic_Mathematical_Alphabetic_Symbols',
  676. astral: '\uD83B[\uDE00-\uDEFF]'
  677. },
  678. {
  679. name: 'InArabic_Presentation_Forms_A',
  680. bmp: '\uFB50-\uFDFF'
  681. },
  682. {
  683. name: 'InArabic_Presentation_Forms_B',
  684. bmp: '\uFE70-\uFEFF'
  685. },
  686. {
  687. name: 'InArabic_Supplement',
  688. bmp: '\u0750-\u077F'
  689. },
  690. {
  691. name: 'InArmenian',
  692. bmp: '\u0530-\u058F'
  693. },
  694. {
  695. name: 'InArrows',
  696. bmp: '\u2190-\u21FF'
  697. },
  698. {
  699. name: 'InAvestan',
  700. astral: '\uD802[\uDF00-\uDF3F]'
  701. },
  702. {
  703. name: 'InBalinese',
  704. bmp: '\u1B00-\u1B7F'
  705. },
  706. {
  707. name: 'InBamum',
  708. bmp: '\uA6A0-\uA6FF'
  709. },
  710. {
  711. name: 'InBamum_Supplement',
  712. astral: '\uD81A[\uDC00-\uDE3F]'
  713. },
  714. {
  715. name: 'InBasic_Latin',
  716. bmp: '\0-\x7F'
  717. },
  718. {
  719. name: 'InBassa_Vah',
  720. astral: '\uD81A[\uDED0-\uDEFF]'
  721. },
  722. {
  723. name: 'InBatak',
  724. bmp: '\u1BC0-\u1BFF'
  725. },
  726. {
  727. name: 'InBengali',
  728. bmp: '\u0980-\u09FF'
  729. },
  730. {
  731. name: 'InBhaiksuki',
  732. astral: '\uD807[\uDC00-\uDC6F]'
  733. },
  734. {
  735. name: 'InBlock_Elements',
  736. bmp: '\u2580-\u259F'
  737. },
  738. {
  739. name: 'InBopomofo',
  740. bmp: '\u3100-\u312F'
  741. },
  742. {
  743. name: 'InBopomofo_Extended',
  744. bmp: '\u31A0-\u31BF'
  745. },
  746. {
  747. name: 'InBox_Drawing',
  748. bmp: '\u2500-\u257F'
  749. },
  750. {
  751. name: 'InBrahmi',
  752. astral: '\uD804[\uDC00-\uDC7F]'
  753. },
  754. {
  755. name: 'InBraille_Patterns',
  756. bmp: '\u2800-\u28FF'
  757. },
  758. {
  759. name: 'InBuginese',
  760. bmp: '\u1A00-\u1A1F'
  761. },
  762. {
  763. name: 'InBuhid',
  764. bmp: '\u1740-\u175F'
  765. },
  766. {
  767. name: 'InByzantine_Musical_Symbols',
  768. astral: '\uD834[\uDC00-\uDCFF]'
  769. },
  770. {
  771. name: 'InCJK_Compatibility',
  772. bmp: '\u3300-\u33FF'
  773. },
  774. {
  775. name: 'InCJK_Compatibility_Forms',
  776. bmp: '\uFE30-\uFE4F'
  777. },
  778. {
  779. name: 'InCJK_Compatibility_Ideographs',
  780. bmp: '\uF900-\uFAFF'
  781. },
  782. {
  783. name: 'InCJK_Compatibility_Ideographs_Supplement',
  784. astral: '\uD87E[\uDC00-\uDE1F]'
  785. },
  786. {
  787. name: 'InCJK_Radicals_Supplement',
  788. bmp: '\u2E80-\u2EFF'
  789. },
  790. {
  791. name: 'InCJK_Strokes',
  792. bmp: '\u31C0-\u31EF'
  793. },
  794. {
  795. name: 'InCJK_Symbols_and_Punctuation',
  796. bmp: '\u3000-\u303F'
  797. },
  798. {
  799. name: 'InCJK_Unified_Ideographs',
  800. bmp: '\u4E00-\u9FFF'
  801. },
  802. {
  803. name: 'InCJK_Unified_Ideographs_Extension_A',
  804. bmp: '\u3400-\u4DBF'
  805. },
  806. {
  807. name: 'InCJK_Unified_Ideographs_Extension_B',
  808. astral: '[\uD840-\uD868][\uDC00-\uDFFF]|\uD869[\uDC00-\uDEDF]'
  809. },
  810. {
  811. name: 'InCJK_Unified_Ideographs_Extension_C',
  812. astral: '\uD869[\uDF00-\uDFFF]|[\uD86A-\uD86C][\uDC00-\uDFFF]|\uD86D[\uDC00-\uDF3F]'
  813. },
  814. {
  815. name: 'InCJK_Unified_Ideographs_Extension_D',
  816. astral: '\uD86D[\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1F]'
  817. },
  818. {
  819. name: 'InCJK_Unified_Ideographs_Extension_E',
  820. astral: '\uD86E[\uDC20-\uDFFF]|[\uD86F-\uD872][\uDC00-\uDFFF]|\uD873[\uDC00-\uDEAF]'
  821. },
  822. {
  823. name: 'InCarian',
  824. astral: '\uD800[\uDEA0-\uDEDF]'
  825. },
  826. {
  827. name: 'InCaucasian_Albanian',
  828. astral: '\uD801[\uDD30-\uDD6F]'
  829. },
  830. {
  831. name: 'InChakma',
  832. astral: '\uD804[\uDD00-\uDD4F]'
  833. },
  834. {
  835. name: 'InCham',
  836. bmp: '\uAA00-\uAA5F'
  837. },
  838. {
  839. name: 'InCherokee',
  840. bmp: '\u13A0-\u13FF'
  841. },
  842. {
  843. name: 'InCherokee_Supplement',
  844. bmp: '\uAB70-\uABBF'
  845. },
  846. {
  847. name: 'InCombining_Diacritical_Marks',
  848. bmp: '\u0300-\u036F'
  849. },
  850. {
  851. name: 'InCombining_Diacritical_Marks_Extended',
  852. bmp: '\u1AB0-\u1AFF'
  853. },
  854. {
  855. name: 'InCombining_Diacritical_Marks_Supplement',
  856. bmp: '\u1DC0-\u1DFF'
  857. },
  858. {
  859. name: 'InCombining_Diacritical_Marks_for_Symbols',
  860. bmp: '\u20D0-\u20FF'
  861. },
  862. {
  863. name: 'InCombining_Half_Marks',
  864. bmp: '\uFE20-\uFE2F'
  865. },
  866. {
  867. name: 'InCommon_Indic_Number_Forms',
  868. bmp: '\uA830-\uA83F'
  869. },
  870. {
  871. name: 'InControl_Pictures',
  872. bmp: '\u2400-\u243F'
  873. },
  874. {
  875. name: 'InCoptic',
  876. bmp: '\u2C80-\u2CFF'
  877. },
  878. {
  879. name: 'InCoptic_Epact_Numbers',
  880. astral: '\uD800[\uDEE0-\uDEFF]'
  881. },
  882. {
  883. name: 'InCounting_Rod_Numerals',
  884. astral: '\uD834[\uDF60-\uDF7F]'
  885. },
  886. {
  887. name: 'InCuneiform',
  888. astral: '\uD808[\uDC00-\uDFFF]'
  889. },
  890. {
  891. name: 'InCuneiform_Numbers_and_Punctuation',
  892. astral: '\uD809[\uDC00-\uDC7F]'
  893. },
  894. {
  895. name: 'InCurrency_Symbols',
  896. bmp: '\u20A0-\u20CF'
  897. },
  898. {
  899. name: 'InCypriot_Syllabary',
  900. astral: '\uD802[\uDC00-\uDC3F]'
  901. },
  902. {
  903. name: 'InCyrillic',
  904. bmp: '\u0400-\u04FF'
  905. },
  906. {
  907. name: 'InCyrillic_Extended_A',
  908. bmp: '\u2DE0-\u2DFF'
  909. },
  910. {
  911. name: 'InCyrillic_Extended_B',
  912. bmp: '\uA640-\uA69F'
  913. },
  914. {
  915. name: 'InCyrillic_Extended_C',
  916. bmp: '\u1C80-\u1C8F'
  917. },
  918. {
  919. name: 'InCyrillic_Supplement',
  920. bmp: '\u0500-\u052F'
  921. },
  922. {
  923. name: 'InDeseret',
  924. astral: '\uD801[\uDC00-\uDC4F]'
  925. },
  926. {
  927. name: 'InDevanagari',
  928. bmp: '\u0900-\u097F'
  929. },
  930. {
  931. name: 'InDevanagari_Extended',
  932. bmp: '\uA8E0-\uA8FF'
  933. },
  934. {
  935. name: 'InDingbats',
  936. bmp: '\u2700-\u27BF'
  937. },
  938. {
  939. name: 'InDomino_Tiles',
  940. astral: '\uD83C[\uDC30-\uDC9F]'
  941. },
  942. {
  943. name: 'InDuployan',
  944. astral: '\uD82F[\uDC00-\uDC9F]'
  945. },
  946. {
  947. name: 'InEarly_Dynastic_Cuneiform',
  948. astral: '\uD809[\uDC80-\uDD4F]'
  949. },
  950. {
  951. name: 'InEgyptian_Hieroglyphs',
  952. astral: '\uD80C[\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F]'
  953. },
  954. {
  955. name: 'InElbasan',
  956. astral: '\uD801[\uDD00-\uDD2F]'
  957. },
  958. {
  959. name: 'InEmoticons',
  960. astral: '\uD83D[\uDE00-\uDE4F]'
  961. },
  962. {
  963. name: 'InEnclosed_Alphanumeric_Supplement',
  964. astral: '\uD83C[\uDD00-\uDDFF]'
  965. },
  966. {
  967. name: 'InEnclosed_Alphanumerics',
  968. bmp: '\u2460-\u24FF'
  969. },
  970. {
  971. name: 'InEnclosed_CJK_Letters_and_Months',
  972. bmp: '\u3200-\u32FF'
  973. },
  974. {
  975. name: 'InEnclosed_Ideographic_Supplement',
  976. astral: '\uD83C[\uDE00-\uDEFF]'
  977. },
  978. {
  979. name: 'InEthiopic',
  980. bmp: '\u1200-\u137F'
  981. },
  982. {
  983. name: 'InEthiopic_Extended',
  984. bmp: '\u2D80-\u2DDF'
  985. },
  986. {
  987. name: 'InEthiopic_Extended_A',
  988. bmp: '\uAB00-\uAB2F'
  989. },
  990. {
  991. name: 'InEthiopic_Supplement',
  992. bmp: '\u1380-\u139F'
  993. },
  994. {
  995. name: 'InGeneral_Punctuation',
  996. bmp: '\u2000-\u206F'
  997. },
  998. {
  999. name: 'InGeometric_Shapes',
  1000. bmp: '\u25A0-\u25FF'
  1001. },
  1002. {
  1003. name: 'InGeometric_Shapes_Extended',
  1004. astral: '\uD83D[\uDF80-\uDFFF]'
  1005. },
  1006. {
  1007. name: 'InGeorgian',
  1008. bmp: '\u10A0-\u10FF'
  1009. },
  1010. {
  1011. name: 'InGeorgian_Supplement',
  1012. bmp: '\u2D00-\u2D2F'
  1013. },
  1014. {
  1015. name: 'InGlagolitic',
  1016. bmp: '\u2C00-\u2C5F'
  1017. },
  1018. {
  1019. name: 'InGlagolitic_Supplement',
  1020. astral: '\uD838[\uDC00-\uDC2F]'
  1021. },
  1022. {
  1023. name: 'InGothic',
  1024. astral: '\uD800[\uDF30-\uDF4F]'
  1025. },
  1026. {
  1027. name: 'InGrantha',
  1028. astral: '\uD804[\uDF00-\uDF7F]'
  1029. },
  1030. {
  1031. name: 'InGreek_Extended',
  1032. bmp: '\u1F00-\u1FFF'
  1033. },
  1034. {
  1035. name: 'InGreek_and_Coptic',
  1036. bmp: '\u0370-\u03FF'
  1037. },
  1038. {
  1039. name: 'InGujarati',
  1040. bmp: '\u0A80-\u0AFF'
  1041. },
  1042. {
  1043. name: 'InGurmukhi',
  1044. bmp: '\u0A00-\u0A7F'
  1045. },
  1046. {
  1047. name: 'InHalfwidth_and_Fullwidth_Forms',
  1048. bmp: '\uFF00-\uFFEF'
  1049. },
  1050. {
  1051. name: 'InHangul_Compatibility_Jamo',
  1052. bmp: '\u3130-\u318F'
  1053. },
  1054. {
  1055. name: 'InHangul_Jamo',
  1056. bmp: '\u1100-\u11FF'
  1057. },
  1058. {
  1059. name: 'InHangul_Jamo_Extended_A',
  1060. bmp: '\uA960-\uA97F'
  1061. },
  1062. {
  1063. name: 'InHangul_Jamo_Extended_B',
  1064. bmp: '\uD7B0-\uD7FF'
  1065. },
  1066. {
  1067. name: 'InHangul_Syllables',
  1068. bmp: '\uAC00-\uD7AF'
  1069. },
  1070. {
  1071. name: 'InHanunoo',
  1072. bmp: '\u1720-\u173F'
  1073. },
  1074. {
  1075. name: 'InHatran',
  1076. astral: '\uD802[\uDCE0-\uDCFF]'
  1077. },
  1078. {
  1079. name: 'InHebrew',
  1080. bmp: '\u0590-\u05FF'
  1081. },
  1082. {
  1083. name: 'InHigh_Private_Use_Surrogates',
  1084. bmp: '\uDB80-\uDBFF'
  1085. },
  1086. {
  1087. name: 'InHigh_Surrogates',
  1088. bmp: '\uD800-\uDB7F'
  1089. },
  1090. {
  1091. name: 'InHiragana',
  1092. bmp: '\u3040-\u309F'
  1093. },
  1094. {
  1095. name: 'InIPA_Extensions',
  1096. bmp: '\u0250-\u02AF'
  1097. },
  1098. {
  1099. name: 'InIdeographic_Description_Characters',
  1100. bmp: '\u2FF0-\u2FFF'
  1101. },
  1102. {
  1103. name: 'InIdeographic_Symbols_and_Punctuation',
  1104. astral: '\uD81B[\uDFE0-\uDFFF]'
  1105. },
  1106. {
  1107. name: 'InImperial_Aramaic',
  1108. astral: '\uD802[\uDC40-\uDC5F]'
  1109. },
  1110. {
  1111. name: 'InInscriptional_Pahlavi',
  1112. astral: '\uD802[\uDF60-\uDF7F]'
  1113. },
  1114. {
  1115. name: 'InInscriptional_Parthian',
  1116. astral: '\uD802[\uDF40-\uDF5F]'
  1117. },
  1118. {
  1119. name: 'InJavanese',
  1120. bmp: '\uA980-\uA9DF'
  1121. },
  1122. {
  1123. name: 'InKaithi',
  1124. astral: '\uD804[\uDC80-\uDCCF]'
  1125. },
  1126. {
  1127. name: 'InKana_Supplement',
  1128. astral: '\uD82C[\uDC00-\uDCFF]'
  1129. },
  1130. {
  1131. name: 'InKanbun',
  1132. bmp: '\u3190-\u319F'
  1133. },
  1134. {
  1135. name: 'InKangxi_Radicals',
  1136. bmp: '\u2F00-\u2FDF'
  1137. },
  1138. {
  1139. name: 'InKannada',
  1140. bmp: '\u0C80-\u0CFF'
  1141. },
  1142. {
  1143. name: 'InKatakana',
  1144. bmp: '\u30A0-\u30FF'
  1145. },
  1146. {
  1147. name: 'InKatakana_Phonetic_Extensions',
  1148. bmp: '\u31F0-\u31FF'
  1149. },
  1150. {
  1151. name: 'InKayah_Li',
  1152. bmp: '\uA900-\uA92F'
  1153. },
  1154. {
  1155. name: 'InKharoshthi',
  1156. astral: '\uD802[\uDE00-\uDE5F]'
  1157. },
  1158. {
  1159. name: 'InKhmer',
  1160. bmp: '\u1780-\u17FF'
  1161. },
  1162. {
  1163. name: 'InKhmer_Symbols',
  1164. bmp: '\u19E0-\u19FF'
  1165. },
  1166. {
  1167. name: 'InKhojki',
  1168. astral: '\uD804[\uDE00-\uDE4F]'
  1169. },
  1170. {
  1171. name: 'InKhudawadi',
  1172. astral: '\uD804[\uDEB0-\uDEFF]'
  1173. },
  1174. {
  1175. name: 'InLao',
  1176. bmp: '\u0E80-\u0EFF'
  1177. },
  1178. {
  1179. name: 'InLatin_Extended_Additional',
  1180. bmp: '\u1E00-\u1EFF'
  1181. },
  1182. {
  1183. name: 'InLatin_Extended_A',
  1184. bmp: '\u0100-\u017F'
  1185. },
  1186. {
  1187. name: 'InLatin_Extended_B',
  1188. bmp: '\u0180-\u024F'
  1189. },
  1190. {
  1191. name: 'InLatin_Extended_C',
  1192. bmp: '\u2C60-\u2C7F'
  1193. },
  1194. {
  1195. name: 'InLatin_Extended_D',
  1196. bmp: '\uA720-\uA7FF'
  1197. },
  1198. {
  1199. name: 'InLatin_Extended_E',
  1200. bmp: '\uAB30-\uAB6F'
  1201. },
  1202. {
  1203. name: 'InLatin_1_Supplement',
  1204. bmp: '\x80-\xFF'
  1205. },
  1206. {
  1207. name: 'InLepcha',
  1208. bmp: '\u1C00-\u1C4F'
  1209. },
  1210. {
  1211. name: 'InLetterlike_Symbols',
  1212. bmp: '\u2100-\u214F'
  1213. },
  1214. {
  1215. name: 'InLimbu',
  1216. bmp: '\u1900-\u194F'
  1217. },
  1218. {
  1219. name: 'InLinear_A',
  1220. astral: '\uD801[\uDE00-\uDF7F]'
  1221. },
  1222. {
  1223. name: 'InLinear_B_Ideograms',
  1224. astral: '\uD800[\uDC80-\uDCFF]'
  1225. },
  1226. {
  1227. name: 'InLinear_B_Syllabary',
  1228. astral: '\uD800[\uDC00-\uDC7F]'
  1229. },
  1230. {
  1231. name: 'InLisu',
  1232. bmp: '\uA4D0-\uA4FF'
  1233. },
  1234. {
  1235. name: 'InLow_Surrogates',
  1236. bmp: '\uDC00-\uDFFF'
  1237. },
  1238. {
  1239. name: 'InLycian',
  1240. astral: '\uD800[\uDE80-\uDE9F]'
  1241. },
  1242. {
  1243. name: 'InLydian',
  1244. astral: '\uD802[\uDD20-\uDD3F]'
  1245. },
  1246. {
  1247. name: 'InMahajani',
  1248. astral: '\uD804[\uDD50-\uDD7F]'
  1249. },
  1250. {
  1251. name: 'InMahjong_Tiles',
  1252. astral: '\uD83C[\uDC00-\uDC2F]'
  1253. },
  1254. {
  1255. name: 'InMalayalam',
  1256. bmp: '\u0D00-\u0D7F'
  1257. },
  1258. {
  1259. name: 'InMandaic',
  1260. bmp: '\u0840-\u085F'
  1261. },
  1262. {
  1263. name: 'InManichaean',
  1264. astral: '\uD802[\uDEC0-\uDEFF]'
  1265. },
  1266. {
  1267. name: 'InMarchen',
  1268. astral: '\uD807[\uDC70-\uDCBF]'
  1269. },
  1270. {
  1271. name: 'InMathematical_Alphanumeric_Symbols',
  1272. astral: '\uD835[\uDC00-\uDFFF]'
  1273. },
  1274. {
  1275. name: 'InMathematical_Operators',
  1276. bmp: '\u2200-\u22FF'
  1277. },
  1278. {
  1279. name: 'InMeetei_Mayek',
  1280. bmp: '\uABC0-\uABFF'
  1281. },
  1282. {
  1283. name: 'InMeetei_Mayek_Extensions',
  1284. bmp: '\uAAE0-\uAAFF'
  1285. },
  1286. {
  1287. name: 'InMende_Kikakui',
  1288. astral: '\uD83A[\uDC00-\uDCDF]'
  1289. },
  1290. {
  1291. name: 'InMeroitic_Cursive',
  1292. astral: '\uD802[\uDDA0-\uDDFF]'
  1293. },
  1294. {
  1295. name: 'InMeroitic_Hieroglyphs',
  1296. astral: '\uD802[\uDD80-\uDD9F]'
  1297. },
  1298. {
  1299. name: 'InMiao',
  1300. astral: '\uD81B[\uDF00-\uDF9F]'
  1301. },
  1302. {
  1303. name: 'InMiscellaneous_Mathematical_Symbols_A',
  1304. bmp: '\u27C0-\u27EF'
  1305. },
  1306. {
  1307. name: 'InMiscellaneous_Mathematical_Symbols_B',
  1308. bmp: '\u2980-\u29FF'
  1309. },
  1310. {
  1311. name: 'InMiscellaneous_Symbols',
  1312. bmp: '\u2600-\u26FF'
  1313. },
  1314. {
  1315. name: 'InMiscellaneous_Symbols_and_Arrows',
  1316. bmp: '\u2B00-\u2BFF'
  1317. },
  1318. {
  1319. name: 'InMiscellaneous_Symbols_and_Pictographs',
  1320. astral: '\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDDFF]'
  1321. },
  1322. {
  1323. name: 'InMiscellaneous_Technical',
  1324. bmp: '\u2300-\u23FF'
  1325. },
  1326. {
  1327. name: 'InModi',
  1328. astral: '\uD805[\uDE00-\uDE5F]'
  1329. },
  1330. {
  1331. name: 'InModifier_Tone_Letters',
  1332. bmp: '\uA700-\uA71F'
  1333. },
  1334. {
  1335. name: 'InMongolian',
  1336. bmp: '\u1800-\u18AF'
  1337. },
  1338. {
  1339. name: 'InMongolian_Supplement',
  1340. astral: '\uD805[\uDE60-\uDE7F]'
  1341. },
  1342. {
  1343. name: 'InMro',
  1344. astral: '\uD81A[\uDE40-\uDE6F]'
  1345. },
  1346. {
  1347. name: 'InMultani',
  1348. astral: '\uD804[\uDE80-\uDEAF]'
  1349. },
  1350. {
  1351. name: 'InMusical_Symbols',
  1352. astral: '\uD834[\uDD00-\uDDFF]'
  1353. },
  1354. {
  1355. name: 'InMyanmar',
  1356. bmp: '\u1000-\u109F'
  1357. },
  1358. {
  1359. name: 'InMyanmar_Extended_A',
  1360. bmp: '\uAA60-\uAA7F'
  1361. },
  1362. {
  1363. name: 'InMyanmar_Extended_B',
  1364. bmp: '\uA9E0-\uA9FF'
  1365. },
  1366. {
  1367. name: 'InNKo',
  1368. bmp: '\u07C0-\u07FF'
  1369. },
  1370. {
  1371. name: 'InNabataean',
  1372. astral: '\uD802[\uDC80-\uDCAF]'
  1373. },
  1374. {
  1375. name: 'InNew_Tai_Lue',
  1376. bmp: '\u1980-\u19DF'
  1377. },
  1378. {
  1379. name: 'InNewa',
  1380. astral: '\uD805[\uDC00-\uDC7F]'
  1381. },
  1382. {
  1383. name: 'InNumber_Forms',
  1384. bmp: '\u2150-\u218F'
  1385. },
  1386. {
  1387. name: 'InOgham',
  1388. bmp: '\u1680-\u169F'
  1389. },
  1390. {
  1391. name: 'InOl_Chiki',
  1392. bmp: '\u1C50-\u1C7F'
  1393. },
  1394. {
  1395. name: 'InOld_Hungarian',
  1396. astral: '\uD803[\uDC80-\uDCFF]'
  1397. },
  1398. {
  1399. name: 'InOld_Italic',
  1400. astral: '\uD800[\uDF00-\uDF2F]'
  1401. },
  1402. {
  1403. name: 'InOld_North_Arabian',
  1404. astral: '\uD802[\uDE80-\uDE9F]'
  1405. },
  1406. {
  1407. name: 'InOld_Permic',
  1408. astral: '\uD800[\uDF50-\uDF7F]'
  1409. },
  1410. {
  1411. name: 'InOld_Persian',
  1412. astral: '\uD800[\uDFA0-\uDFDF]'
  1413. },
  1414. {
  1415. name: 'InOld_South_Arabian',
  1416. astral: '\uD802[\uDE60-\uDE7F]'
  1417. },
  1418. {
  1419. name: 'InOld_Turkic',
  1420. astral: '\uD803[\uDC00-\uDC4F]'
  1421. },
  1422. {
  1423. name: 'InOptical_Character_Recognition',
  1424. bmp: '\u2440-\u245F'
  1425. },
  1426. {
  1427. name: 'InOriya',
  1428. bmp: '\u0B00-\u0B7F'
  1429. },
  1430. {
  1431. name: 'InOrnamental_Dingbats',
  1432. astral: '\uD83D[\uDE50-\uDE7F]'
  1433. },
  1434. {
  1435. name: 'InOsage',
  1436. astral: '\uD801[\uDCB0-\uDCFF]'
  1437. },
  1438. {
  1439. name: 'InOsmanya',
  1440. astral: '\uD801[\uDC80-\uDCAF]'
  1441. },
  1442. {
  1443. name: 'InPahawh_Hmong',
  1444. astral: '\uD81A[\uDF00-\uDF8F]'
  1445. },
  1446. {
  1447. name: 'InPalmyrene',
  1448. astral: '\uD802[\uDC60-\uDC7F]'
  1449. },
  1450. {
  1451. name: 'InPau_Cin_Hau',
  1452. astral: '\uD806[\uDEC0-\uDEFF]'
  1453. },
  1454. {
  1455. name: 'InPhags_pa',
  1456. bmp: '\uA840-\uA87F'
  1457. },
  1458. {
  1459. name: 'InPhaistos_Disc',
  1460. astral: '\uD800[\uDDD0-\uDDFF]'
  1461. },
  1462. {
  1463. name: 'InPhoenician',
  1464. astral: '\uD802[\uDD00-\uDD1F]'
  1465. },
  1466. {
  1467. name: 'InPhonetic_Extensions',
  1468. bmp: '\u1D00-\u1D7F'
  1469. },
  1470. {
  1471. name: 'InPhonetic_Extensions_Supplement',
  1472. bmp: '\u1D80-\u1DBF'
  1473. },
  1474. {
  1475. name: 'InPlaying_Cards',
  1476. astral: '\uD83C[\uDCA0-\uDCFF]'
  1477. },
  1478. {
  1479. name: 'InPrivate_Use_Area',
  1480. bmp: '\uE000-\uF8FF'
  1481. },
  1482. {
  1483. name: 'InPsalter_Pahlavi',
  1484. astral: '\uD802[\uDF80-\uDFAF]'
  1485. },
  1486. {
  1487. name: 'InRejang',
  1488. bmp: '\uA930-\uA95F'
  1489. },
  1490. {
  1491. name: 'InRumi_Numeral_Symbols',
  1492. astral: '\uD803[\uDE60-\uDE7F]'
  1493. },
  1494. {
  1495. name: 'InRunic',
  1496. bmp: '\u16A0-\u16FF'
  1497. },
  1498. {
  1499. name: 'InSamaritan',
  1500. bmp: '\u0800-\u083F'
  1501. },
  1502. {
  1503. name: 'InSaurashtra',
  1504. bmp: '\uA880-\uA8DF'
  1505. },
  1506. {
  1507. name: 'InSharada',
  1508. astral: '\uD804[\uDD80-\uDDDF]'
  1509. },
  1510. {
  1511. name: 'InShavian',
  1512. astral: '\uD801[\uDC50-\uDC7F]'
  1513. },
  1514. {
  1515. name: 'InShorthand_Format_Controls',
  1516. astral: '\uD82F[\uDCA0-\uDCAF]'
  1517. },
  1518. {
  1519. name: 'InSiddham',
  1520. astral: '\uD805[\uDD80-\uDDFF]'
  1521. },
  1522. {
  1523. name: 'InSinhala',
  1524. bmp: '\u0D80-\u0DFF'
  1525. },
  1526. {
  1527. name: 'InSinhala_Archaic_Numbers',
  1528. astral: '\uD804[\uDDE0-\uDDFF]'
  1529. },
  1530. {
  1531. name: 'InSmall_Form_Variants',
  1532. bmp: '\uFE50-\uFE6F'
  1533. },
  1534. {
  1535. name: 'InSora_Sompeng',
  1536. astral: '\uD804[\uDCD0-\uDCFF]'
  1537. },
  1538. {
  1539. name: 'InSpacing_Modifier_Letters',
  1540. bmp: '\u02B0-\u02FF'
  1541. },
  1542. {
  1543. name: 'InSpecials',
  1544. bmp: '\uFFF0-\uFFFF'
  1545. },
  1546. {
  1547. name: 'InSundanese',
  1548. bmp: '\u1B80-\u1BBF'
  1549. },
  1550. {
  1551. name: 'InSundanese_Supplement',
  1552. bmp: '\u1CC0-\u1CCF'
  1553. },
  1554. {
  1555. name: 'InSuperscripts_and_Subscripts',
  1556. bmp: '\u2070-\u209F'
  1557. },
  1558. {
  1559. name: 'InSupplemental_Arrows_A',
  1560. bmp: '\u27F0-\u27FF'
  1561. },
  1562. {
  1563. name: 'InSupplemental_Arrows_B',
  1564. bmp: '\u2900-\u297F'
  1565. },
  1566. {
  1567. name: 'InSupplemental_Arrows_C',
  1568. astral: '\uD83E[\uDC00-\uDCFF]'
  1569. },
  1570. {
  1571. name: 'InSupplemental_Mathematical_Operators',
  1572. bmp: '\u2A00-\u2AFF'
  1573. },
  1574. {
  1575. name: 'InSupplemental_Punctuation',
  1576. bmp: '\u2E00-\u2E7F'
  1577. },
  1578. {
  1579. name: 'InSupplemental_Symbols_and_Pictographs',
  1580. astral: '\uD83E[\uDD00-\uDDFF]'
  1581. },
  1582. {
  1583. name: 'InSupplementary_Private_Use_Area_A',
  1584. astral: '[\uDB80-\uDBBF][\uDC00-\uDFFF]'
  1585. },
  1586. {
  1587. name: 'InSupplementary_Private_Use_Area_B',
  1588. astral: '[\uDBC0-\uDBFF][\uDC00-\uDFFF]'
  1589. },
  1590. {
  1591. name: 'InSutton_SignWriting',
  1592. astral: '\uD836[\uDC00-\uDEAF]'
  1593. },
  1594. {
  1595. name: 'InSyloti_Nagri',
  1596. bmp: '\uA800-\uA82F'
  1597. },
  1598. {
  1599. name: 'InSyriac',
  1600. bmp: '\u0700-\u074F'
  1601. },
  1602. {
  1603. name: 'InTagalog',
  1604. bmp: '\u1700-\u171F'
  1605. },
  1606. {
  1607. name: 'InTagbanwa',
  1608. bmp: '\u1760-\u177F'
  1609. },
  1610. {
  1611. name: 'InTags',
  1612. astral: '\uDB40[\uDC00-\uDC7F]'
  1613. },
  1614. {
  1615. name: 'InTai_Le',
  1616. bmp: '\u1950-\u197F'
  1617. },
  1618. {
  1619. name: 'InTai_Tham',
  1620. bmp: '\u1A20-\u1AAF'
  1621. },
  1622. {
  1623. name: 'InTai_Viet',
  1624. bmp: '\uAA80-\uAADF'
  1625. },
  1626. {
  1627. name: 'InTai_Xuan_Jing_Symbols',
  1628. astral: '\uD834[\uDF00-\uDF5F]'
  1629. },
  1630. {
  1631. name: 'InTakri',
  1632. astral: '\uD805[\uDE80-\uDECF]'
  1633. },
  1634. {
  1635. name: 'InTamil',
  1636. bmp: '\u0B80-\u0BFF'
  1637. },
  1638. {
  1639. name: 'InTangut',
  1640. astral: '[\uD81C-\uD821][\uDC00-\uDFFF]'
  1641. },
  1642. {
  1643. name: 'InTangut_Components',
  1644. astral: '\uD822[\uDC00-\uDEFF]'
  1645. },
  1646. {
  1647. name: 'InTelugu',
  1648. bmp: '\u0C00-\u0C7F'
  1649. },
  1650. {
  1651. name: 'InThaana',
  1652. bmp: '\u0780-\u07BF'
  1653. },
  1654. {
  1655. name: 'InThai',
  1656. bmp: '\u0E00-\u0E7F'
  1657. },
  1658. {
  1659. name: 'InTibetan',
  1660. bmp: '\u0F00-\u0FFF'
  1661. },
  1662. {
  1663. name: 'InTifinagh',
  1664. bmp: '\u2D30-\u2D7F'
  1665. },
  1666. {
  1667. name: 'InTirhuta',
  1668. astral: '\uD805[\uDC80-\uDCDF]'
  1669. },
  1670. {
  1671. name: 'InTransport_and_Map_Symbols',
  1672. astral: '\uD83D[\uDE80-\uDEFF]'
  1673. },
  1674. {
  1675. name: 'InUgaritic',
  1676. astral: '\uD800[\uDF80-\uDF9F]'
  1677. },
  1678. {
  1679. name: 'InUnified_Canadian_Aboriginal_Syllabics',
  1680. bmp: '\u1400-\u167F'
  1681. },
  1682. {
  1683. name: 'InUnified_Canadian_Aboriginal_Syllabics_Extended',
  1684. bmp: '\u18B0-\u18FF'
  1685. },
  1686. {
  1687. name: 'InVai',
  1688. bmp: '\uA500-\uA63F'
  1689. },
  1690. {
  1691. name: 'InVariation_Selectors',
  1692. bmp: '\uFE00-\uFE0F'
  1693. },
  1694. {
  1695. name: 'InVariation_Selectors_Supplement',
  1696. astral: '\uDB40[\uDD00-\uDDEF]'
  1697. },
  1698. {
  1699. name: 'InVedic_Extensions',
  1700. bmp: '\u1CD0-\u1CFF'
  1701. },
  1702. {
  1703. name: 'InVertical_Forms',
  1704. bmp: '\uFE10-\uFE1F'
  1705. },
  1706. {
  1707. name: 'InWarang_Citi',
  1708. astral: '\uD806[\uDCA0-\uDCFF]'
  1709. },
  1710. {
  1711. name: 'InYi_Radicals',
  1712. bmp: '\uA490-\uA4CF'
  1713. },
  1714. {
  1715. name: 'InYi_Syllables',
  1716. bmp: '\uA000-\uA48F'
  1717. },
  1718. {
  1719. name: 'InYijing_Hexagram_Symbols',
  1720. bmp: '\u4DC0-\u4DFF'
  1721. }
  1722. ]);
  1723. };
  1724. },{}],5:[function(require,module,exports){
  1725. /*!
  1726. * XRegExp Unicode Categories 3.2.0
  1727. * <xregexp.com>
  1728. * Steven Levithan (c) 2010-2017 MIT License
  1729. * Unicode data by Mathias Bynens <mathiasbynens.be>
  1730. */
  1731. module.exports = function(XRegExp) {
  1732. 'use strict';
  1733. /**
  1734. * Adds support for Unicode's general categories. E.g., `\p{Lu}` or `\p{Uppercase Letter}`. See
  1735. * category descriptions in UAX #44 <http://unicode.org/reports/tr44/#GC_Values_Table>. Token
  1736. * names are case insensitive, and any spaces, hyphens, and underscores are ignored.
  1737. *
  1738. * Uses Unicode 9.0.0.
  1739. *
  1740. * @requires XRegExp, Unicode Base
  1741. */
  1742. if (!XRegExp.addUnicodeData) {
  1743. throw new ReferenceError('Unicode Base must be loaded before Unicode Categories');
  1744. }
  1745. XRegExp.addUnicodeData([
  1746. {
  1747. name: 'C',
  1748. alias: 'Other',
  1749. isBmpLast: true,
  1750. bmp: '\0-\x1F\x7F-\x9F\xAD\u0378\u0379\u0380-\u0383\u038B\u038D\u03A2\u0530\u0557\u0558\u0560\u0588\u058B\u058C\u0590\u05C8-\u05CF\u05EB-\u05EF\u05F5-\u0605\u061C\u061D\u06DD\u070E\u070F\u074B\u074C\u07B2-\u07BF\u07FB-\u07FF\u082E\u082F\u083F\u085C\u085D\u085F-\u089F\u08B5\u08BE-\u08D3\u08E2\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09FC-\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF2-\u0AF8\u0AFA-\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B55\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B78-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BFB-\u0BFF\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C77\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0D00\u0D04\u0D0D\u0D11\u0D3B\u0D3C\u0D45\u0D49\u0D50-\u0D53\u0D64\u0D65\u0D80\u0D81\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF5-\u0E00\u0E3B-\u0E3E\u0E5C-\u0E80\u0E83\u0E85\u0E86\u0E89\u0E8B\u0E8C\u0E8E-\u0E93\u0E98\u0EA0\u0EA4\u0EA6\u0EA8\u0EA9\u0EAC\u0EBA\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F48\u0F6D-\u0F70\u0F98\u0FBD\u0FCD\u0FDB-\u0FFF\u10C6\u10C8-\u10CC\u10CE\u10CF\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u137D-\u137F\u139A-\u139F\u13F6\u13F7\u13FE\u13FF\u169D-\u169F\u16F9-\u16FF\u170D\u1715-\u171F\u1737-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17DE\u17DF\u17EA-\u17EF\u17FA-\u17FF\u180E\u180F\u181A-\u181F\u1878-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u193F\u1941-\u1943\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DB-\u19DD\u1A1C\u1A1D\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1A9F\u1AAE\u1AAF\u1ABF-\u1AFF\u1B4C-\u1B4F\u1B7D-\u1B7F\u1BF4-\u1BFB\u1C38-\u1C3A\u1C4A-\u1C4C\u1C89-\u1CBF\u1CC8-\u1CCF\u1CF7\u1CFA-\u1CFF\u1DF6-\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FC5\u1FD4\u1FD5\u1FDC\u1FF0\u1FF1\u1FF5\u1FFF\u200B-\u200F\u202A-\u202E\u2060-\u206F\u2072\u2073\u208F\u209D-\u209F\u20BF-\u20CF\u20F1-\u20FF\u218C-\u218F\u23FF\u2427-\u243F\u244B-\u245F\u2B74\u2B75\u2B96\u2B97\u2BBA-\u2BBC\u2BC9\u2BD2-\u2BEB\u2BF0-\u2BFF\u2C2F\u2C5F\u2CF4-\u2CF8\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D71-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E45-\u2E7F\u2E9A\u2EF4-\u2EFF\u2FD6-\u2FEF\u2FFC-\u2FFF\u3040\u3097\u3098\u3100-\u3104\u312E-\u3130\u318F\u31BB-\u31BF\u31E4-\u31EF\u321F\u32FF\u4DB6-\u4DBF\u9FD6-\u9FFF\uA48D-\uA48F\uA4C7-\uA4CF\uA62C-\uA63F\uA6F8-\uA6FF\uA7AF\uA7B8-\uA7F6\uA82C-\uA82F\uA83A-\uA83F\uA878-\uA87F\uA8C6-\uA8CD\uA8DA-\uA8DF\uA8FE\uA8FF\uA954-\uA95E\uA97D-\uA97F\uA9CE\uA9DA-\uA9DD\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A\uAA5B\uAAC3-\uAADA\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB66-\uAB6F\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBC2-\uFBD2\uFD40-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFE\uFDFF\uFE1A-\uFE1F\uFE53\uFE67\uFE6C-\uFE6F\uFE75\uFEFD-\uFF00\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFDF\uFFE7\uFFEF-\uFFFB\uFFFE\uFFFF',
  1751. astral: '\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDCFF\uDD03-\uDD06\uDD34-\uDD36\uDD8F\uDD9C-\uDD9F\uDDA1-\uDDCF\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEFC-\uDEFF\uDF24-\uDF2F\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDFC4-\uDFC7\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDD6E\uDD70-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56\uDC9F-\uDCA6\uDCB0-\uDCDF\uDCF3\uDCF6-\uDCFA\uDD1C-\uDD1E\uDD3A-\uDD3E\uDD40-\uDD7F\uDDB8-\uDDBB\uDDD0\uDDD1\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE34-\uDE37\uDE3B-\uDE3E\uDE48-\uDE4F\uDE59-\uDE5F\uDEA0-\uDEBF\uDEE7-\uDEEA\uDEF7-\uDEFF\uDF36-\uDF38\uDF56\uDF57\uDF73-\uDF77\uDF92-\uDF98\uDF9D-\uDFA8\uDFB0-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCF9\uDD00-\uDE5F\uDE7F-\uDFFF]|\uD804[\uDC4E-\uDC51\uDC70-\uDC7E\uDCBD\uDCC2-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD44-\uDD4F\uDD77-\uDD7F\uDDCE\uDDCF\uDDE0\uDDF5-\uDDFF\uDE12\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEAA-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF3B\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC5A\uDC5C\uDC5E-\uDC7F\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDDE-\uDDFF\uDE45-\uDE4F\uDE5A-\uDE5F\uDE6D-\uDE7F\uDEB8-\uDEBF\uDECA-\uDEFF\uDF1A-\uDF1C\uDF2C-\uDF2F\uDF40-\uDFFF]|\uD806[\uDC00-\uDC9F\uDCF3-\uDCFE\uDD00-\uDEBF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC46-\uDC4F\uDC6D-\uDC6F\uDC90\uDC91\uDCA8\uDCB7-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F\uDC75-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80B\uD80E-\uD810\uD812-\uD819\uD823-\uD82B\uD82D\uD82E\uD830-\uD833\uD837\uD839\uD83F\uD874-\uD87D\uD87F-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDE6D\uDE70-\uDECF\uDEEE\uDEEF\uDEF6-\uDEFF\uDF46-\uDF4F\uDF5A\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDEFF\uDF45-\uDF4F\uDF7F-\uDF8E\uDFA0-\uDFDF\uDFE1-\uDFFF]|\uD821[\uDFED-\uDFFF]|\uD822[\uDEF3-\uDFFF]|\uD82C[\uDC02-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A\uDC9B\uDCA0-\uDFFF]|\uD834[\uDCF6-\uDCFF\uDD27\uDD28\uDD73-\uDD7A\uDDE9-\uDDFF\uDE46-\uDEFF\uDF57-\uDF5F\uDF72-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDFCC\uDFCD]|\uD836[\uDE8C-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDFFF]|\uD83A[\uDCC5\uDCC6\uDCD7-\uDCFF\uDD4B-\uDD4F\uDD5A-\uDD5D\uDD60-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDEEF\uDEF2-\uDFFF]|\uD83C[\uDC2C-\uDC2F\uDC94-\uDC9F\uDCAF\uDCB0\uDCC0\uDCD0\uDCF6-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD6F\uDDAD-\uDDE5\uDE03-\uDE0F\uDE3C-\uDE3F\uDE49-\uDE4F\uDE52-\uDEFF]|\uD83D[\uDED3-\uDEDF\uDEED-\uDEEF\uDEF7-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDD0F\uDD1F\uDD28-\uDD2F\uDD31\uDD32\uDD3F\uDD4C-\uDD4F\uDD5F-\uDD7F\uDD92-\uDDBF\uDDC1-\uDFFF]|\uD869[\uDED7-\uDEFF]|\uD86D[\uDF35-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]'
  1752. },
  1753. {
  1754. name: 'Cc',
  1755. alias: 'Control',
  1756. bmp: '\0-\x1F\x7F-\x9F'
  1757. },
  1758. {
  1759. name: 'Cf',
  1760. alias: 'Format',
  1761. bmp: '\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB',
  1762. astral: '\uD804\uDCBD|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]'
  1763. },
  1764. {
  1765. name: 'Cn',
  1766. alias: 'Unassigned',
  1767. bmp: '\u0378\u0379\u0380-\u0383\u038B\u038D\u03A2\u0530\u0557\u0558\u0560\u0588\u058B\u058C\u0590\u05C8-\u05CF\u05EB-\u05EF\u05F5-\u05FF\u061D\u070E\u074B\u074C\u07B2-\u07BF\u07FB-\u07FF\u082E\u082F\u083F\u085C\u085D\u085F-\u089F\u08B5\u08BE-\u08D3\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09FC-\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF2-\u0AF8\u0AFA-\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B55\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B78-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BFB-\u0BFF\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C77\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0D00\u0D04\u0D0D\u0D11\u0D3B\u0D3C\u0D45\u0D49\u0D50-\u0D53\u0D64\u0D65\u0D80\u0D81\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF5-\u0E00\u0E3B-\u0E3E\u0E5C-\u0E80\u0E83\u0E85\u0E86\u0E89\u0E8B\u0E8C\u0E8E-\u0E93\u0E98\u0EA0\u0EA4\u0EA6\u0EA8\u0EA9\u0EAC\u0EBA\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F48\u0F6D-\u0F70\u0F98\u0FBD\u0FCD\u0FDB-\u0FFF\u10C6\u10C8-\u10CC\u10CE\u10CF\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u137D-\u137F\u139A-\u139F\u13F6\u13F7\u13FE\u13FF\u169D-\u169F\u16F9-\u16FF\u170D\u1715-\u171F\u1737-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17DE\u17DF\u17EA-\u17EF\u17FA-\u17FF\u180F\u181A-\u181F\u1878-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u193F\u1941-\u1943\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DB-\u19DD\u1A1C\u1A1D\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1A9F\u1AAE\u1AAF\u1ABF-\u1AFF\u1B4C-\u1B4F\u1B7D-\u1B7F\u1BF4-\u1BFB\u1C38-\u1C3A\u1C4A-\u1C4C\u1C89-\u1CBF\u1CC8-\u1CCF\u1CF7\u1CFA-\u1CFF\u1DF6-\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FC5\u1FD4\u1FD5\u1FDC\u1FF0\u1FF1\u1FF5\u1FFF\u2065\u2072\u2073\u208F\u209D-\u209F\u20BF-\u20CF\u20F1-\u20FF\u218C-\u218F\u23FF\u2427-\u243F\u244B-\u245F\u2B74\u2B75\u2B96\u2B97\u2BBA-\u2BBC\u2BC9\u2BD2-\u2BEB\u2BF0-\u2BFF\u2C2F\u2C5F\u2CF4-\u2CF8\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D71-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E45-\u2E7F\u2E9A\u2EF4-\u2EFF\u2FD6-\u2FEF\u2FFC-\u2FFF\u3040\u3097\u3098\u3100-\u3104\u312E-\u3130\u318F\u31BB-\u31BF\u31E4-\u31EF\u321F\u32FF\u4DB6-\u4DBF\u9FD6-\u9FFF\uA48D-\uA48F\uA4C7-\uA4CF\uA62C-\uA63F\uA6F8-\uA6FF\uA7AF\uA7B8-\uA7F6\uA82C-\uA82F\uA83A-\uA83F\uA878-\uA87F\uA8C6-\uA8CD\uA8DA-\uA8DF\uA8FE\uA8FF\uA954-\uA95E\uA97D-\uA97F\uA9CE\uA9DA-\uA9DD\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A\uAA5B\uAAC3-\uAADA\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB66-\uAB6F\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBC2-\uFBD2\uFD40-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFE\uFDFF\uFE1A-\uFE1F\uFE53\uFE67\uFE6C-\uFE6F\uFE75\uFEFD\uFEFE\uFF00\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFDF\uFFE7\uFFEF-\uFFF8\uFFFE\uFFFF',
  1768. astral: '\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDCFF\uDD03-\uDD06\uDD34-\uDD36\uDD8F\uDD9C-\uDD9F\uDDA1-\uDDCF\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEFC-\uDEFF\uDF24-\uDF2F\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDFC4-\uDFC7\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDD6E\uDD70-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56\uDC9F-\uDCA6\uDCB0-\uDCDF\uDCF3\uDCF6-\uDCFA\uDD1C-\uDD1E\uDD3A-\uDD3E\uDD40-\uDD7F\uDDB8-\uDDBB\uDDD0\uDDD1\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE34-\uDE37\uDE3B-\uDE3E\uDE48-\uDE4F\uDE59-\uDE5F\uDEA0-\uDEBF\uDEE7-\uDEEA\uDEF7-\uDEFF\uDF36-\uDF38\uDF56\uDF57\uDF73-\uDF77\uDF92-\uDF98\uDF9D-\uDFA8\uDFB0-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCF9\uDD00-\uDE5F\uDE7F-\uDFFF]|\uD804[\uDC4E-\uDC51\uDC70-\uDC7E\uDCC2-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD44-\uDD4F\uDD77-\uDD7F\uDDCE\uDDCF\uDDE0\uDDF5-\uDDFF\uDE12\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEAA-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF3B\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC5A\uDC5C\uDC5E-\uDC7F\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDDE-\uDDFF\uDE45-\uDE4F\uDE5A-\uDE5F\uDE6D-\uDE7F\uDEB8-\uDEBF\uDECA-\uDEFF\uDF1A-\uDF1C\uDF2C-\uDF2F\uDF40-\uDFFF]|\uD806[\uDC00-\uDC9F\uDCF3-\uDCFE\uDD00-\uDEBF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC46-\uDC4F\uDC6D-\uDC6F\uDC90\uDC91\uDCA8\uDCB7-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F\uDC75-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80B\uD80E-\uD810\uD812-\uD819\uD823-\uD82B\uD82D\uD82E\uD830-\uD833\uD837\uD839\uD83F\uD874-\uD87D\uD87F-\uDB3F\uDB41-\uDB7F][\uDC00-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDE6D\uDE70-\uDECF\uDEEE\uDEEF\uDEF6-\uDEFF\uDF46-\uDF4F\uDF5A\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDEFF\uDF45-\uDF4F\uDF7F-\uDF8E\uDFA0-\uDFDF\uDFE1-\uDFFF]|\uD821[\uDFED-\uDFFF]|\uD822[\uDEF3-\uDFFF]|\uD82C[\uDC02-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A\uDC9B\uDCA4-\uDFFF]|\uD834[\uDCF6-\uDCFF\uDD27\uDD28\uDDE9-\uDDFF\uDE46-\uDEFF\uDF57-\uDF5F\uDF72-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDFCC\uDFCD]|\uD836[\uDE8C-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDFFF]|\uD83A[\uDCC5\uDCC6\uDCD7-\uDCFF\uDD4B-\uDD4F\uDD5A-\uDD5D\uDD60-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDEEF\uDEF2-\uDFFF]|\uD83C[\uDC2C-\uDC2F\uDC94-\uDC9F\uDCAF\uDCB0\uDCC0\uDCD0\uDCF6-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD6F\uDDAD-\uDDE5\uDE03-\uDE0F\uDE3C-\uDE3F\uDE49-\uDE4F\uDE52-\uDEFF]|\uD83D[\uDED3-\uDEDF\uDEED-\uDEEF\uDEF7-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDD0F\uDD1F\uDD28-\uDD2F\uDD31\uDD32\uDD3F\uDD4C-\uDD4F\uDD5F-\uDD7F\uDD92-\uDDBF\uDDC1-\uDFFF]|\uD869[\uDED7-\uDEFF]|\uD86D[\uDF35-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uDB40[\uDC00\uDC02-\uDC1F\uDC80-\uDCFF\uDDF0-\uDFFF]|[\uDBBF\uDBFF][\uDFFE\uDFFF]'
  1769. },
  1770. {
  1771. name: 'Co',
  1772. alias: 'Private_Use',
  1773. bmp: '\uE000-\uF8FF',
  1774. astral: '[\uDB80-\uDBBE\uDBC0-\uDBFE][\uDC00-\uDFFF]|[\uDBBF\uDBFF][\uDC00-\uDFFD]'
  1775. },
  1776. {
  1777. name: 'Cs',
  1778. alias: 'Surrogate',
  1779. bmp: '\uD800-\uDFFF'
  1780. },
  1781. {
  1782. name: 'L',
  1783. alias: 'Letter',
  1784. bmp: 'A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC',
  1785. astral: '\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]'
  1786. },
  1787. {
  1788. name: 'Ll',
  1789. alias: 'Lowercase_Letter',
  1790. bmp: 'a-z\xB5\xDF-\xF6\xF8-\xFF\u0101\u0103\u0105\u0107\u0109\u010B\u010D\u010F\u0111\u0113\u0115\u0117\u0119\u011B\u011D\u011F\u0121\u0123\u0125\u0127\u0129\u012B\u012D\u012F\u0131\u0133\u0135\u0137\u0138\u013A\u013C\u013E\u0140\u0142\u0144\u0146\u0148\u0149\u014B\u014D\u014F\u0151\u0153\u0155\u0157\u0159\u015B\u015D\u015F\u0161\u0163\u0165\u0167\u0169\u016B\u016D\u016F\u0171\u0173\u0175\u0177\u017A\u017C\u017E-\u0180\u0183\u0185\u0188\u018C\u018D\u0192\u0195\u0199-\u019B\u019E\u01A1\u01A3\u01A5\u01A8\u01AA\u01AB\u01AD\u01B0\u01B4\u01B6\u01B9\u01BA\u01BD-\u01BF\u01C6\u01C9\u01CC\u01CE\u01D0\u01D2\u01D4\u01D6\u01D8\u01DA\u01DC\u01DD\u01DF\u01E1\u01E3\u01E5\u01E7\u01E9\u01EB\u01ED\u01EF\u01F0\u01F3\u01F5\u01F9\u01FB\u01FD\u01FF\u0201\u0203\u0205\u0207\u0209\u020B\u020D\u020F\u0211\u0213\u0215\u0217\u0219\u021B\u021D\u021F\u0221\u0223\u0225\u0227\u0229\u022B\u022D\u022F\u0231\u0233-\u0239\u023C\u023F\u0240\u0242\u0247\u0249\u024B\u024D\u024F-\u0293\u0295-\u02AF\u0371\u0373\u0377\u037B-\u037D\u0390\u03AC-\u03CE\u03D0\u03D1\u03D5-\u03D7\u03D9\u03DB\u03DD\u03DF\u03E1\u03E3\u03E5\u03E7\u03E9\u03EB\u03ED\u03EF-\u03F3\u03F5\u03F8\u03FB\u03FC\u0430-\u045F\u0461\u0463\u0465\u0467\u0469\u046B\u046D\u046F\u0471\u0473\u0475\u0477\u0479\u047B\u047D\u047F\u0481\u048B\u048D\u048F\u0491\u0493\u0495\u0497\u0499\u049B\u049D\u049F\u04A1\u04A3\u04A5\u04A7\u04A9\u04AB\u04AD\u04AF\u04B1\u04B3\u04B5\u04B7\u04B9\u04BB\u04BD\u04BF\u04C2\u04C4\u04C6\u04C8\u04CA\u04CC\u04CE\u04CF\u04D1\u04D3\u04D5\u04D7\u04D9\u04DB\u04DD\u04DF\u04E1\u04E3\u04E5\u04E7\u04E9\u04EB\u04ED\u04EF\u04F1\u04F3\u04F5\u04F7\u04F9\u04FB\u04FD\u04FF\u0501\u0503\u0505\u0507\u0509\u050B\u050D\u050F\u0511\u0513\u0515\u0517\u0519\u051B\u051D\u051F\u0521\u0523\u0525\u0527\u0529\u052B\u052D\u052F\u0561-\u0587\u13F8-\u13FD\u1C80-\u1C88\u1D00-\u1D2B\u1D6B-\u1D77\u1D79-\u1D9A\u1E01\u1E03\u1E05\u1E07\u1E09\u1E0B\u1E0D\u1E0F\u1E11\u1E13\u1E15\u1E17\u1E19\u1E1B\u1E1D\u1E1F\u1E21\u1E23\u1E25\u1E27\u1E29\u1E2B\u1E2D\u1E2F\u1E31\u1E33\u1E35\u1E37\u1E39\u1E3B\u1E3D\u1E3F\u1E41\u1E43\u1E45\u1E47\u1E49\u1E4B\u1E4D\u1E4F\u1E51\u1E53\u1E55\u1E57\u1E59\u1E5B\u1E5D\u1E5F\u1E61\u1E63\u1E65\u1E67\u1E69\u1E6B\u1E6D\u1E6F\u1E71\u1E73\u1E75\u1E77\u1E79\u1E7B\u1E7D\u1E7F\u1E81\u1E83\u1E85\u1E87\u1E89\u1E8B\u1E8D\u1E8F\u1E91\u1E93\u1E95-\u1E9D\u1E9F\u1EA1\u1EA3\u1EA5\u1EA7\u1EA9\u1EAB\u1EAD\u1EAF\u1EB1\u1EB3\u1EB5\u1EB7\u1EB9\u1EBB\u1EBD\u1EBF\u1EC1\u1EC3\u1EC5\u1EC7\u1EC9\u1ECB\u1ECD\u1ECF\u1ED1\u1ED3\u1ED5\u1ED7\u1ED9\u1EDB\u1EDD\u1EDF\u1EE1\u1EE3\u1EE5\u1EE7\u1EE9\u1EEB\u1EED\u1EEF\u1EF1\u1EF3\u1EF5\u1EF7\u1EF9\u1EFB\u1EFD\u1EFF-\u1F07\u1F10-\u1F15\u1F20-\u1F27\u1F30-\u1F37\u1F40-\u1F45\u1F50-\u1F57\u1F60-\u1F67\u1F70-\u1F7D\u1F80-\u1F87\u1F90-\u1F97\u1FA0-\u1FA7\u1FB0-\u1FB4\u1FB6\u1FB7\u1FBE\u1FC2-\u1FC4\u1FC6\u1FC7\u1FD0-\u1FD3\u1FD6\u1FD7\u1FE0-\u1FE7\u1FF2-\u1FF4\u1FF6\u1FF7\u210A\u210E\u210F\u2113\u212F\u2134\u2139\u213C\u213D\u2146-\u2149\u214E\u2184\u2C30-\u2C5E\u2C61\u2C65\u2C66\u2C68\u2C6A\u2C6C\u2C71\u2C73\u2C74\u2C76-\u2C7B\u2C81\u2C83\u2C85\u2C87\u2C89\u2C8B\u2C8D\u2C8F\u2C91\u2C93\u2C95\u2C97\u2C99\u2C9B\u2C9D\u2C9F\u2CA1\u2CA3\u2CA5\u2CA7\u2CA9\u2CAB\u2CAD\u2CAF\u2CB1\u2CB3\u2CB5\u2CB7\u2CB9\u2CBB\u2CBD\u2CBF\u2CC1\u2CC3\u2CC5\u2CC7\u2CC9\u2CCB\u2CCD\u2CCF\u2CD1\u2CD3\u2CD5\u2CD7\u2CD9\u2CDB\u2CDD\u2CDF\u2CE1\u2CE3\u2CE4\u2CEC\u2CEE\u2CF3\u2D00-\u2D25\u2D27\u2D2D\uA641\uA643\uA645\uA647\uA649\uA64B\uA64D\uA64F\uA651\uA653\uA655\uA657\uA659\uA65B\uA65D\uA65F\uA661\uA663\uA665\uA667\uA669\uA66B\uA66D\uA681\uA683\uA685\uA687\uA689\uA68B\uA68D\uA68F\uA691\uA693\uA695\uA697\uA699\uA69B\uA723\uA725\uA727\uA729\uA72B\uA72D\uA72F-\uA731\uA733\uA735\uA737\uA739\uA73B\uA73D\uA73F\uA741\uA743\uA745\uA747\uA749\uA74B\uA74D\uA74F\uA751\uA753\uA755\uA757\uA759\uA75B\uA75D\uA75F\uA761\uA763\uA765\uA767\uA769\uA76B\uA76D\uA76F\uA771-\uA778\uA77A\uA77C\uA77F\uA781\uA783\uA785\uA787\uA78C\uA78E\uA791\uA793-\uA795\uA797\uA799\uA79B\uA79D\uA79F\uA7A1\uA7A3\uA7A5\uA7A7\uA7A9\uA7B5\uA7B7\uA7FA\uAB30-\uAB5A\uAB60-\uAB65\uAB70-\uABBF\uFB00-\uFB06\uFB13-\uFB17\uFF41-\uFF5A',
  1791. astral: '\uD801[\uDC28-\uDC4F\uDCD8-\uDCFB]|\uD803[\uDCC0-\uDCF2]|\uD806[\uDCC0-\uDCDF]|\uD835[\uDC1A-\uDC33\uDC4E-\uDC54\uDC56-\uDC67\uDC82-\uDC9B\uDCB6-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDCEA-\uDD03\uDD1E-\uDD37\uDD52-\uDD6B\uDD86-\uDD9F\uDDBA-\uDDD3\uDDEE-\uDE07\uDE22-\uDE3B\uDE56-\uDE6F\uDE8A-\uDEA5\uDEC2-\uDEDA\uDEDC-\uDEE1\uDEFC-\uDF14\uDF16-\uDF1B\uDF36-\uDF4E\uDF50-\uDF55\uDF70-\uDF88\uDF8A-\uDF8F\uDFAA-\uDFC2\uDFC4-\uDFC9\uDFCB]|\uD83A[\uDD22-\uDD43]'
  1792. },
  1793. {
  1794. name: 'Lm',
  1795. alias: 'Modifier_Letter',
  1796. bmp: '\u02B0-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0374\u037A\u0559\u0640\u06E5\u06E6\u07F4\u07F5\u07FA\u081A\u0824\u0828\u0971\u0E46\u0EC6\u10FC\u17D7\u1843\u1AA7\u1C78-\u1C7D\u1D2C-\u1D6A\u1D78\u1D9B-\u1DBF\u2071\u207F\u2090-\u209C\u2C7C\u2C7D\u2D6F\u2E2F\u3005\u3031-\u3035\u303B\u309D\u309E\u30FC-\u30FE\uA015\uA4F8-\uA4FD\uA60C\uA67F\uA69C\uA69D\uA717-\uA71F\uA770\uA788\uA7F8\uA7F9\uA9CF\uA9E6\uAA70\uAADD\uAAF3\uAAF4\uAB5C-\uAB5F\uFF70\uFF9E\uFF9F',
  1797. astral: '\uD81A[\uDF40-\uDF43]|\uD81B[\uDF93-\uDF9F\uDFE0]'
  1798. },
  1799. {
  1800. name: 'Lo',
  1801. alias: 'Other_Letter',
  1802. bmp: '\xAA\xBA\u01BB\u01C0-\u01C3\u0294\u05D0-\u05EA\u05F0-\u05F2\u0620-\u063F\u0641-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u0800-\u0815\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0972-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E45\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10D0-\u10FA\u10FD-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17DC\u1820-\u1842\u1844-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C77\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u2135-\u2138\u2D30-\u2D67\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3006\u303C\u3041-\u3096\u309F\u30A1-\u30FA\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA014\uA016-\uA48C\uA4D0-\uA4F7\uA500-\uA60B\uA610-\uA61F\uA62A\uA62B\uA66E\uA6A0-\uA6E5\uA78F\uA7F7\uA7FB-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9E0-\uA9E4\uA9E7-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA6F\uAA71-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB\uAADC\uAAE0-\uAAEA\uAAF2\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF66-\uFF6F\uFF71-\uFF9D\uFFA0-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC',
  1803. astral: '\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC50-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]'
  1804. },
  1805. {
  1806. name: 'Lt',
  1807. alias: 'Titlecase_Letter',
  1808. bmp: '\u01C5\u01C8\u01CB\u01F2\u1F88-\u1F8F\u1F98-\u1F9F\u1FA8-\u1FAF\u1FBC\u1FCC\u1FFC'
  1809. },
  1810. {
  1811. name: 'Lu',
  1812. alias: 'Uppercase_Letter',
  1813. bmp: 'A-Z\xC0-\xD6\xD8-\xDE\u0100\u0102\u0104\u0106\u0108\u010A\u010C\u010E\u0110\u0112\u0114\u0116\u0118\u011A\u011C\u011E\u0120\u0122\u0124\u0126\u0128\u012A\u012C\u012E\u0130\u0132\u0134\u0136\u0139\u013B\u013D\u013F\u0141\u0143\u0145\u0147\u014A\u014C\u014E\u0150\u0152\u0154\u0156\u0158\u015A\u015C\u015E\u0160\u0162\u0164\u0166\u0168\u016A\u016C\u016E\u0170\u0172\u0174\u0176\u0178\u0179\u017B\u017D\u0181\u0182\u0184\u0186\u0187\u0189-\u018B\u018E-\u0191\u0193\u0194\u0196-\u0198\u019C\u019D\u019F\u01A0\u01A2\u01A4\u01A6\u01A7\u01A9\u01AC\u01AE\u01AF\u01B1-\u01B3\u01B5\u01B7\u01B8\u01BC\u01C4\u01C7\u01CA\u01CD\u01CF\u01D1\u01D3\u01D5\u01D7\u01D9\u01DB\u01DE\u01E0\u01E2\u01E4\u01E6\u01E8\u01EA\u01EC\u01EE\u01F1\u01F4\u01F6-\u01F8\u01FA\u01FC\u01FE\u0200\u0202\u0204\u0206\u0208\u020A\u020C\u020E\u0210\u0212\u0214\u0216\u0218\u021A\u021C\u021E\u0220\u0222\u0224\u0226\u0228\u022A\u022C\u022E\u0230\u0232\u023A\u023B\u023D\u023E\u0241\u0243-\u0246\u0248\u024A\u024C\u024E\u0370\u0372\u0376\u037F\u0386\u0388-\u038A\u038C\u038E\u038F\u0391-\u03A1\u03A3-\u03AB\u03CF\u03D2-\u03D4\u03D8\u03DA\u03DC\u03DE\u03E0\u03E2\u03E4\u03E6\u03E8\u03EA\u03EC\u03EE\u03F4\u03F7\u03F9\u03FA\u03FD-\u042F\u0460\u0462\u0464\u0466\u0468\u046A\u046C\u046E\u0470\u0472\u0474\u0476\u0478\u047A\u047C\u047E\u0480\u048A\u048C\u048E\u0490\u0492\u0494\u0496\u0498\u049A\u049C\u049E\u04A0\u04A2\u04A4\u04A6\u04A8\u04AA\u04AC\u04AE\u04B0\u04B2\u04B4\u04B6\u04B8\u04BA\u04BC\u04BE\u04C0\u04C1\u04C3\u04C5\u04C7\u04C9\u04CB\u04CD\u04D0\u04D2\u04D4\u04D6\u04D8\u04DA\u04DC\u04DE\u04E0\u04E2\u04E4\u04E6\u04E8\u04EA\u04EC\u04EE\u04F0\u04F2\u04F4\u04F6\u04F8\u04FA\u04FC\u04FE\u0500\u0502\u0504\u0506\u0508\u050A\u050C\u050E\u0510\u0512\u0514\u0516\u0518\u051A\u051C\u051E\u0520\u0522\u0524\u0526\u0528\u052A\u052C\u052E\u0531-\u0556\u10A0-\u10C5\u10C7\u10CD\u13A0-\u13F5\u1E00\u1E02\u1E04\u1E06\u1E08\u1E0A\u1E0C\u1E0E\u1E10\u1E12\u1E14\u1E16\u1E18\u1E1A\u1E1C\u1E1E\u1E20\u1E22\u1E24\u1E26\u1E28\u1E2A\u1E2C\u1E2E\u1E30\u1E32\u1E34\u1E36\u1E38\u1E3A\u1E3C\u1E3E\u1E40\u1E42\u1E44\u1E46\u1E48\u1E4A\u1E4C\u1E4E\u1E50\u1E52\u1E54\u1E56\u1E58\u1E5A\u1E5C\u1E5E\u1E60\u1E62\u1E64\u1E66\u1E68\u1E6A\u1E6C\u1E6E\u1E70\u1E72\u1E74\u1E76\u1E78\u1E7A\u1E7C\u1E7E\u1E80\u1E82\u1E84\u1E86\u1E88\u1E8A\u1E8C\u1E8E\u1E90\u1E92\u1E94\u1E9E\u1EA0\u1EA2\u1EA4\u1EA6\u1EA8\u1EAA\u1EAC\u1EAE\u1EB0\u1EB2\u1EB4\u1EB6\u1EB8\u1EBA\u1EBC\u1EBE\u1EC0\u1EC2\u1EC4\u1EC6\u1EC8\u1ECA\u1ECC\u1ECE\u1ED0\u1ED2\u1ED4\u1ED6\u1ED8\u1EDA\u1EDC\u1EDE\u1EE0\u1EE2\u1EE4\u1EE6\u1EE8\u1EEA\u1EEC\u1EEE\u1EF0\u1EF2\u1EF4\u1EF6\u1EF8\u1EFA\u1EFC\u1EFE\u1F08-\u1F0F\u1F18-\u1F1D\u1F28-\u1F2F\u1F38-\u1F3F\u1F48-\u1F4D\u1F59\u1F5B\u1F5D\u1F5F\u1F68-\u1F6F\u1FB8-\u1FBB\u1FC8-\u1FCB\u1FD8-\u1FDB\u1FE8-\u1FEC\u1FF8-\u1FFB\u2102\u2107\u210B-\u210D\u2110-\u2112\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u2130-\u2133\u213E\u213F\u2145\u2183\u2C00-\u2C2E\u2C60\u2C62-\u2C64\u2C67\u2C69\u2C6B\u2C6D-\u2C70\u2C72\u2C75\u2C7E-\u2C80\u2C82\u2C84\u2C86\u2C88\u2C8A\u2C8C\u2C8E\u2C90\u2C92\u2C94\u2C96\u2C98\u2C9A\u2C9C\u2C9E\u2CA0\u2CA2\u2CA4\u2CA6\u2CA8\u2CAA\u2CAC\u2CAE\u2CB0\u2CB2\u2CB4\u2CB6\u2CB8\u2CBA\u2CBC\u2CBE\u2CC0\u2CC2\u2CC4\u2CC6\u2CC8\u2CCA\u2CCC\u2CCE\u2CD0\u2CD2\u2CD4\u2CD6\u2CD8\u2CDA\u2CDC\u2CDE\u2CE0\u2CE2\u2CEB\u2CED\u2CF2\uA640\uA642\uA644\uA646\uA648\uA64A\uA64C\uA64E\uA650\uA652\uA654\uA656\uA658\uA65A\uA65C\uA65E\uA660\uA662\uA664\uA666\uA668\uA66A\uA66C\uA680\uA682\uA684\uA686\uA688\uA68A\uA68C\uA68E\uA690\uA692\uA694\uA696\uA698\uA69A\uA722\uA724\uA726\uA728\uA72A\uA72C\uA72E\uA732\uA734\uA736\uA738\uA73A\uA73C\uA73E\uA740\uA742\uA744\uA746\uA748\uA74A\uA74C\uA74E\uA750\uA752\uA754\uA756\uA758\uA75A\uA75C\uA75E\uA760\uA762\uA764\uA766\uA768\uA76A\uA76C\uA76E\uA779\uA77B\uA77D\uA77E\uA780\uA782\uA784\uA786\uA78B\uA78D\uA790\uA792\uA796\uA798\uA79A\uA79C\uA79E\uA7A0\uA7A2\uA7A4\uA7A6\uA7A8\uA7AA-\uA7AE\uA7B0-\uA7B4\uA7B6\uFF21-\uFF3A',
  1814. astral: '\uD801[\uDC00-\uDC27\uDCB0-\uDCD3]|\uD803[\uDC80-\uDCB2]|\uD806[\uDCA0-\uDCBF]|\uD835[\uDC00-\uDC19\uDC34-\uDC4D\uDC68-\uDC81\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB5\uDCD0-\uDCE9\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD38\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD6C-\uDD85\uDDA0-\uDDB9\uDDD4-\uDDED\uDE08-\uDE21\uDE3C-\uDE55\uDE70-\uDE89\uDEA8-\uDEC0\uDEE2-\uDEFA\uDF1C-\uDF34\uDF56-\uDF6E\uDF90-\uDFA8\uDFCA]|\uD83A[\uDD00-\uDD21]'
  1815. },
  1816. {
  1817. name: 'M',
  1818. alias: 'Mark',
  1819. bmp: '\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D4-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F',
  1820. astral: '\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC7F-\uDC82\uDCB0-\uDCBA\uDD00-\uDD02\uDD27-\uDD34\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDDCA-\uDDCC\uDE2C-\uDE37\uDE3E\uDEDF-\uDEEA\uDF00-\uDF03\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC35-\uDC46\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDDDC\uDDDD\uDE30-\uDE40\uDEAB-\uDEB7\uDF1D-\uDF2B]|\uD807[\uDC2F-\uDC36\uDC38-\uDC3F\uDC92-\uDCA7\uDCA9-\uDCB6]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF51-\uDF7E\uDF8F-\uDF92]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uDB40[\uDD00-\uDDEF]'
  1821. },
  1822. {
  1823. name: 'Mc',
  1824. alias: 'Spacing_Mark',
  1825. bmp: '\u0903\u093B\u093E-\u0940\u0949-\u094C\u094E\u094F\u0982\u0983\u09BE-\u09C0\u09C7\u09C8\u09CB\u09CC\u09D7\u0A03\u0A3E-\u0A40\u0A83\u0ABE-\u0AC0\u0AC9\u0ACB\u0ACC\u0B02\u0B03\u0B3E\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0B57\u0BBE\u0BBF\u0BC1\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0BD7\u0C01-\u0C03\u0C41-\u0C44\u0C82\u0C83\u0CBE\u0CC0-\u0CC4\u0CC7\u0CC8\u0CCA\u0CCB\u0CD5\u0CD6\u0D02\u0D03\u0D3E-\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D57\u0D82\u0D83\u0DCF-\u0DD1\u0DD8-\u0DDF\u0DF2\u0DF3\u0F3E\u0F3F\u0F7F\u102B\u102C\u1031\u1038\u103B\u103C\u1056\u1057\u1062-\u1064\u1067-\u106D\u1083\u1084\u1087-\u108C\u108F\u109A-\u109C\u17B6\u17BE-\u17C5\u17C7\u17C8\u1923-\u1926\u1929-\u192B\u1930\u1931\u1933-\u1938\u1A19\u1A1A\u1A55\u1A57\u1A61\u1A63\u1A64\u1A6D-\u1A72\u1B04\u1B35\u1B3B\u1B3D-\u1B41\u1B43\u1B44\u1B82\u1BA1\u1BA6\u1BA7\u1BAA\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2\u1BF3\u1C24-\u1C2B\u1C34\u1C35\u1CE1\u1CF2\u1CF3\u302E\u302F\uA823\uA824\uA827\uA880\uA881\uA8B4-\uA8C3\uA952\uA953\uA983\uA9B4\uA9B5\uA9BA\uA9BB\uA9BD-\uA9C0\uAA2F\uAA30\uAA33\uAA34\uAA4D\uAA7B\uAA7D\uAAEB\uAAEE\uAAEF\uAAF5\uABE3\uABE4\uABE6\uABE7\uABE9\uABEA\uABEC',
  1826. astral: '\uD804[\uDC00\uDC02\uDC82\uDCB0-\uDCB2\uDCB7\uDCB8\uDD2C\uDD82\uDDB3-\uDDB5\uDDBF\uDDC0\uDE2C-\uDE2E\uDE32\uDE33\uDE35\uDEE0-\uDEE2\uDF02\uDF03\uDF3E\uDF3F\uDF41-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63]|\uD805[\uDC35-\uDC37\uDC40\uDC41\uDC45\uDCB0-\uDCB2\uDCB9\uDCBB-\uDCBE\uDCC1\uDDAF-\uDDB1\uDDB8-\uDDBB\uDDBE\uDE30-\uDE32\uDE3B\uDE3C\uDE3E\uDEAC\uDEAE\uDEAF\uDEB6\uDF20\uDF21\uDF26]|\uD807[\uDC2F\uDC3E\uDCA9\uDCB1\uDCB4]|\uD81B[\uDF51-\uDF7E]|\uD834[\uDD65\uDD66\uDD6D-\uDD72]'
  1827. },
  1828. {
  1829. name: 'Me',
  1830. alias: 'Enclosing_Mark',
  1831. bmp: '\u0488\u0489\u1ABE\u20DD-\u20E0\u20E2-\u20E4\uA670-\uA672'
  1832. },
  1833. {
  1834. name: 'Mn',
  1835. alias: 'Nonspacing_Mark',
  1836. bmp: '\u0300-\u036F\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D4-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09C1-\u09C4\u09CD\u09E2\u09E3\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0B01\u0B3C\u0B3F\u0B41-\u0B44\u0B4D\u0B56\u0B62\u0B63\u0B82\u0BC0\u0BCD\u0C00\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC6\u0CCC\u0CCD\u0CE2\u0CE3\u0D01\u0D41-\u0D44\u0D4D\u0D62\u0D63\u0DCA\u0DD2-\u0DD4\u0DD6\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ABD\u1B00-\u1B03\u1B34\u1B36-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFB-\u1DFF\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302D\u3099\u309A\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA8C4\uA8C5\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F',
  1837. astral: '\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD804[\uDC01\uDC38-\uDC46\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDCA-\uDDCC\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3C\uDF40\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDCB3-\uDCB8\uDCBA\uDCBF\uDCC0\uDCC2\uDCC3\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF8F-\uDF92]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD67-\uDD69\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uDB40[\uDD00-\uDDEF]'
  1838. },
  1839. {
  1840. name: 'N',
  1841. alias: 'Number',
  1842. bmp: '0-9\xB2\xB3\xB9\xBC-\xBE\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u09F4-\u09F9\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0B72-\u0B77\u0BE6-\u0BF2\u0C66-\u0C6F\u0C78-\u0C7E\u0CE6-\u0CEF\u0D58-\u0D5E\u0D66-\u0D78\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F33\u1040-\u1049\u1090-\u1099\u1369-\u137C\u16EE-\u16F0\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1946-\u194F\u19D0-\u19DA\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3007\u3021-\u3029\u3038-\u303A\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA620-\uA629\uA6E6-\uA6EF\uA830-\uA835\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19',
  1843. astral: '\uD800[\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDEE1-\uDEFB\uDF20-\uDF23\uDF41\uDF4A\uDFD1-\uDFD5]|\uD801[\uDCA0-\uDCA9]|\uD802[\uDC58-\uDC5F\uDC79-\uDC7F\uDCA7-\uDCAF\uDCFB-\uDCFF\uDD16-\uDD1B\uDDBC\uDDBD\uDDC0-\uDDCF\uDDD2-\uDDFF\uDE40-\uDE47\uDE7D\uDE7E\uDE9D-\uDE9F\uDEEB-\uDEEF\uDF58-\uDF5F\uDF78-\uDF7F\uDFA9-\uDFAF]|\uD803[\uDCFA-\uDCFF\uDE60-\uDE7E]|\uD804[\uDC52-\uDC6F\uDCF0-\uDCF9\uDD36-\uDD3F\uDDD0-\uDDD9\uDDE1-\uDDF4\uDEF0-\uDEF9]|\uD805[\uDC50-\uDC59\uDCD0-\uDCD9\uDE50-\uDE59\uDEC0-\uDEC9\uDF30-\uDF3B]|\uD806[\uDCE0-\uDCF2]|\uD807[\uDC50-\uDC6C]|\uD809[\uDC00-\uDC6E]|\uD81A[\uDE60-\uDE69\uDF50-\uDF59\uDF5B-\uDF61]|\uD834[\uDF60-\uDF71]|\uD835[\uDFCE-\uDFFF]|\uD83A[\uDCC7-\uDCCF\uDD50-\uDD59]|\uD83C[\uDD00-\uDD0C]'
  1844. },
  1845. {
  1846. name: 'Nd',
  1847. alias: 'Decimal_Number',
  1848. bmp: '0-9\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0BE6-\u0BEF\u0C66-\u0C6F\u0CE6-\u0CEF\u0D66-\u0D6F\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F29\u1040-\u1049\u1090-\u1099\u17E0-\u17E9\u1810-\u1819\u1946-\u194F\u19D0-\u19D9\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\uA620-\uA629\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19',
  1849. astral: '\uD801[\uDCA0-\uDCA9]|\uD804[\uDC66-\uDC6F\uDCF0-\uDCF9\uDD36-\uDD3F\uDDD0-\uDDD9\uDEF0-\uDEF9]|\uD805[\uDC50-\uDC59\uDCD0-\uDCD9\uDE50-\uDE59\uDEC0-\uDEC9\uDF30-\uDF39]|\uD806[\uDCE0-\uDCE9]|\uD807[\uDC50-\uDC59]|\uD81A[\uDE60-\uDE69\uDF50-\uDF59]|\uD835[\uDFCE-\uDFFF]|\uD83A[\uDD50-\uDD59]'
  1850. },
  1851. {
  1852. name: 'Nl',
  1853. alias: 'Letter_Number',
  1854. bmp: '\u16EE-\u16F0\u2160-\u2182\u2185-\u2188\u3007\u3021-\u3029\u3038-\u303A\uA6E6-\uA6EF',
  1855. astral: '\uD800[\uDD40-\uDD74\uDF41\uDF4A\uDFD1-\uDFD5]|\uD809[\uDC00-\uDC6E]'
  1856. },
  1857. {
  1858. name: 'No',
  1859. alias: 'Other_Number',
  1860. bmp: '\xB2\xB3\xB9\xBC-\xBE\u09F4-\u09F9\u0B72-\u0B77\u0BF0-\u0BF2\u0C78-\u0C7E\u0D58-\u0D5E\u0D70-\u0D78\u0F2A-\u0F33\u1369-\u137C\u17F0-\u17F9\u19DA\u2070\u2074-\u2079\u2080-\u2089\u2150-\u215F\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA830-\uA835',
  1861. astral: '\uD800[\uDD07-\uDD33\uDD75-\uDD78\uDD8A\uDD8B\uDEE1-\uDEFB\uDF20-\uDF23]|\uD802[\uDC58-\uDC5F\uDC79-\uDC7F\uDCA7-\uDCAF\uDCFB-\uDCFF\uDD16-\uDD1B\uDDBC\uDDBD\uDDC0-\uDDCF\uDDD2-\uDDFF\uDE40-\uDE47\uDE7D\uDE7E\uDE9D-\uDE9F\uDEEB-\uDEEF\uDF58-\uDF5F\uDF78-\uDF7F\uDFA9-\uDFAF]|\uD803[\uDCFA-\uDCFF\uDE60-\uDE7E]|\uD804[\uDC52-\uDC65\uDDE1-\uDDF4]|\uD805[\uDF3A\uDF3B]|\uD806[\uDCEA-\uDCF2]|\uD807[\uDC5A-\uDC6C]|\uD81A[\uDF5B-\uDF61]|\uD834[\uDF60-\uDF71]|\uD83A[\uDCC7-\uDCCF]|\uD83C[\uDD00-\uDD0C]'
  1862. },
  1863. {
  1864. name: 'P',
  1865. alias: 'Punctuation',
  1866. bmp: '\x21-\x23\x25-\\x2A\x2C-\x2F\x3A\x3B\\x3F\x40\\x5B-\\x5D\x5F\\x7B\x7D\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E44\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65',
  1867. astral: '\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD807[\uDC41-\uDC45\uDC70\uDC71]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]'
  1868. },
  1869. {
  1870. name: 'Pc',
  1871. alias: 'Connector_Punctuation',
  1872. bmp: '\x5F\u203F\u2040\u2054\uFE33\uFE34\uFE4D-\uFE4F\uFF3F'
  1873. },
  1874. {
  1875. name: 'Pd',
  1876. alias: 'Dash_Punctuation',
  1877. bmp: '\\x2D\u058A\u05BE\u1400\u1806\u2010-\u2015\u2E17\u2E1A\u2E3A\u2E3B\u2E40\u301C\u3030\u30A0\uFE31\uFE32\uFE58\uFE63\uFF0D'
  1878. },
  1879. {
  1880. name: 'Pe',
  1881. alias: 'Close_Punctuation',
  1882. bmp: '\\x29\\x5D\x7D\u0F3B\u0F3D\u169C\u2046\u207E\u208E\u2309\u230B\u232A\u2769\u276B\u276D\u276F\u2771\u2773\u2775\u27C6\u27E7\u27E9\u27EB\u27ED\u27EF\u2984\u2986\u2988\u298A\u298C\u298E\u2990\u2992\u2994\u2996\u2998\u29D9\u29DB\u29FD\u2E23\u2E25\u2E27\u2E29\u3009\u300B\u300D\u300F\u3011\u3015\u3017\u3019\u301B\u301E\u301F\uFD3E\uFE18\uFE36\uFE38\uFE3A\uFE3C\uFE3E\uFE40\uFE42\uFE44\uFE48\uFE5A\uFE5C\uFE5E\uFF09\uFF3D\uFF5D\uFF60\uFF63'
  1883. },
  1884. {
  1885. name: 'Pf',
  1886. alias: 'Final_Punctuation',
  1887. bmp: '\xBB\u2019\u201D\u203A\u2E03\u2E05\u2E0A\u2E0D\u2E1D\u2E21'
  1888. },
  1889. {
  1890. name: 'Pi',
  1891. alias: 'Initial_Punctuation',
  1892. bmp: '\xAB\u2018\u201B\u201C\u201F\u2039\u2E02\u2E04\u2E09\u2E0C\u2E1C\u2E20'
  1893. },
  1894. {
  1895. name: 'Po',
  1896. alias: 'Other_Punctuation',
  1897. bmp: '\x21-\x23\x25-\x27\\x2A\x2C\\x2E\x2F\x3A\x3B\\x3F\x40\\x5C\xA1\xA7\xB6\xB7\xBF\u037E\u0387\u055A-\u055F\u0589\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u166D\u166E\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u1805\u1807-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2016\u2017\u2020-\u2027\u2030-\u2038\u203B-\u203E\u2041-\u2043\u2047-\u2051\u2053\u2055-\u205E\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00\u2E01\u2E06-\u2E08\u2E0B\u2E0E-\u2E16\u2E18\u2E19\u2E1B\u2E1E\u2E1F\u2E2A-\u2E2E\u2E30-\u2E39\u2E3C-\u2E3F\u2E41\u2E43\u2E44\u3001-\u3003\u303D\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFE10-\uFE16\uFE19\uFE30\uFE45\uFE46\uFE49-\uFE4C\uFE50-\uFE52\uFE54-\uFE57\uFE5F-\uFE61\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF07\uFF0A\uFF0C\uFF0E\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3C\uFF61\uFF64\uFF65',
  1898. astral: '\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD807[\uDC41-\uDC45\uDC70\uDC71]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]'
  1899. },
  1900. {
  1901. name: 'Ps',
  1902. alias: 'Open_Punctuation',
  1903. bmp: '\\x28\\x5B\\x7B\u0F3A\u0F3C\u169B\u201A\u201E\u2045\u207D\u208D\u2308\u230A\u2329\u2768\u276A\u276C\u276E\u2770\u2772\u2774\u27C5\u27E6\u27E8\u27EA\u27EC\u27EE\u2983\u2985\u2987\u2989\u298B\u298D\u298F\u2991\u2993\u2995\u2997\u29D8\u29DA\u29FC\u2E22\u2E24\u2E26\u2E28\u2E42\u3008\u300A\u300C\u300E\u3010\u3014\u3016\u3018\u301A\u301D\uFD3F\uFE17\uFE35\uFE37\uFE39\uFE3B\uFE3D\uFE3F\uFE41\uFE43\uFE47\uFE59\uFE5B\uFE5D\uFF08\uFF3B\uFF5B\uFF5F\uFF62'
  1904. },
  1905. {
  1906. name: 'S',
  1907. alias: 'Symbol',
  1908. bmp: '\\x24\\x2B\x3C-\x3E\\x5E\x60\\x7C\x7E\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20BE\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u23FE\u2400-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B98-\u2BB9\u2BBD-\u2BC8\u2BCA-\u2BD1\u2BEC-\u2BEF\u2CE5-\u2CEA\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u32FE\u3300-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uFB29\uFBB2-\uFBC1\uFDFC\uFDFD\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD',
  1909. astral: '\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9B\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDE8\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD83B[\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD10-\uDD2E\uDD30-\uDD6B\uDD70-\uDDAC\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED2\uDEE0-\uDEEC\uDEF0-\uDEF6\uDF00-\uDF73\uDF80-\uDFD4]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDD10-\uDD1E\uDD20-\uDD27\uDD30\uDD33-\uDD3E\uDD40-\uDD4B\uDD50-\uDD5E\uDD80-\uDD91\uDDC0]'
  1910. },
  1911. {
  1912. name: 'Sc',
  1913. alias: 'Currency_Symbol',
  1914. bmp: '\\x24\xA2-\xA5\u058F\u060B\u09F2\u09F3\u09FB\u0AF1\u0BF9\u0E3F\u17DB\u20A0-\u20BE\uA838\uFDFC\uFE69\uFF04\uFFE0\uFFE1\uFFE5\uFFE6'
  1915. },
  1916. {
  1917. name: 'Sk',
  1918. alias: 'Modifier_Symbol',
  1919. bmp: '\\x5E\x60\xA8\xAF\xB4\xB8\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u309B\u309C\uA700-\uA716\uA720\uA721\uA789\uA78A\uAB5B\uFBB2-\uFBC1\uFF3E\uFF40\uFFE3',
  1920. astral: '\uD83C[\uDFFB-\uDFFF]'
  1921. },
  1922. {
  1923. name: 'Sm',
  1924. alias: 'Math_Symbol',
  1925. bmp: '\\x2B\x3C-\x3E\\x7C\x7E\xAC\xB1\xD7\xF7\u03F6\u0606-\u0608\u2044\u2052\u207A-\u207C\u208A-\u208C\u2118\u2140-\u2144\u214B\u2190-\u2194\u219A\u219B\u21A0\u21A3\u21A6\u21AE\u21CE\u21CF\u21D2\u21D4\u21F4-\u22FF\u2320\u2321\u237C\u239B-\u23B3\u23DC-\u23E1\u25B7\u25C1\u25F8-\u25FF\u266F\u27C0-\u27C4\u27C7-\u27E5\u27F0-\u27FF\u2900-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2AFF\u2B30-\u2B44\u2B47-\u2B4C\uFB29\uFE62\uFE64-\uFE66\uFF0B\uFF1C-\uFF1E\uFF5C\uFF5E\uFFE2\uFFE9-\uFFEC',
  1926. astral: '\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD83B[\uDEF0\uDEF1]'
  1927. },
  1928. {
  1929. name: 'So',
  1930. alias: 'Other_Symbol',
  1931. bmp: '\xA6\xA9\xAE\xB0\u0482\u058D\u058E\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u09FA\u0B70\u0BF3-\u0BF8\u0BFA\u0C7F\u0D4F\u0D79\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116\u2117\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u214A\u214C\u214D\u214F\u218A\u218B\u2195-\u2199\u219C-\u219F\u21A1\u21A2\u21A4\u21A5\u21A7-\u21AD\u21AF-\u21CD\u21D0\u21D1\u21D3\u21D5-\u21F3\u2300-\u2307\u230C-\u231F\u2322-\u2328\u232B-\u237B\u237D-\u239A\u23B4-\u23DB\u23E2-\u23FE\u2400-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u25B6\u25B8-\u25C0\u25C2-\u25F7\u2600-\u266E\u2670-\u2767\u2794-\u27BF\u2800-\u28FF\u2B00-\u2B2F\u2B45\u2B46\u2B4D-\u2B73\u2B76-\u2B95\u2B98-\u2BB9\u2BBD-\u2BC8\u2BCA-\u2BD1\u2BEC-\u2BEF\u2CE5-\u2CEA\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u32FE\u3300-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA828-\uA82B\uA836\uA837\uA839\uAA77-\uAA79\uFDFD\uFFE4\uFFE8\uFFED\uFFEE\uFFFC\uFFFD',
  1932. astral: '\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9B\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDE8\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD10-\uDD2E\uDD30-\uDD6B\uDD70-\uDDAC\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDF00-\uDFFA]|\uD83D[\uDC00-\uDED2\uDEE0-\uDEEC\uDEF0-\uDEF6\uDF00-\uDF73\uDF80-\uDFD4]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDD10-\uDD1E\uDD20-\uDD27\uDD30\uDD33-\uDD3E\uDD40-\uDD4B\uDD50-\uDD5E\uDD80-\uDD91\uDDC0]'
  1933. },
  1934. {
  1935. name: 'Z',
  1936. alias: 'Separator',
  1937. bmp: '\x20\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000'
  1938. },
  1939. {
  1940. name: 'Zl',
  1941. alias: 'Line_Separator',
  1942. bmp: '\u2028'
  1943. },
  1944. {
  1945. name: 'Zp',
  1946. alias: 'Paragraph_Separator',
  1947. bmp: '\u2029'
  1948. },
  1949. {
  1950. name: 'Zs',
  1951. alias: 'Space_Separator',
  1952. bmp: '\x20\xA0\u1680\u2000-\u200A\u202F\u205F\u3000'
  1953. }
  1954. ]);
  1955. };
  1956. },{}],6:[function(require,module,exports){
  1957. /*!
  1958. * XRegExp Unicode Properties 3.2.0
  1959. * <xregexp.com>
  1960. * Steven Levithan (c) 2012-2017 MIT License
  1961. * Unicode data by Mathias Bynens <mathiasbynens.be>
  1962. */
  1963. module.exports = function(XRegExp) {
  1964. 'use strict';
  1965. /**
  1966. * Adds properties to meet the UTS #18 Level 1 RL1.2 requirements for Unicode regex support. See
  1967. * <http://unicode.org/reports/tr18/#RL1.2>. Following are definitions of these properties from
  1968. * UAX #44 <http://unicode.org/reports/tr44/>:
  1969. *
  1970. * - Alphabetic
  1971. * Characters with the Alphabetic property. Generated from: Lowercase + Uppercase + Lt + Lm +
  1972. * Lo + Nl + Other_Alphabetic.
  1973. *
  1974. * - Default_Ignorable_Code_Point
  1975. * For programmatic determination of default ignorable code points. New characters that should
  1976. * be ignored in rendering (unless explicitly supported) will be assigned in these ranges,
  1977. * permitting programs to correctly handle the default rendering of such characters when not
  1978. * otherwise supported.
  1979. *
  1980. * - Lowercase
  1981. * Characters with the Lowercase property. Generated from: Ll + Other_Lowercase.
  1982. *
  1983. * - Noncharacter_Code_Point
  1984. * Code points permanently reserved for internal use.
  1985. *
  1986. * - Uppercase
  1987. * Characters with the Uppercase property. Generated from: Lu + Other_Uppercase.
  1988. *
  1989. * - White_Space
  1990. * Spaces, separator characters and other control characters which should be treated by
  1991. * programming languages as "white space" for the purpose of parsing elements.
  1992. *
  1993. * The properties ASCII, Any, and Assigned are also included but are not defined in UAX #44. UTS
  1994. * #18 RL1.2 additionally requires support for Unicode scripts and general categories. These are
  1995. * included in XRegExp's Unicode Categories and Unicode Scripts addons.
  1996. *
  1997. * Token names are case insensitive, and any spaces, hyphens, and underscores are ignored.
  1998. *
  1999. * Uses Unicode 9.0.0.
  2000. *
  2001. * @requires XRegExp, Unicode Base
  2002. */
  2003. if (!XRegExp.addUnicodeData) {
  2004. throw new ReferenceError('Unicode Base must be loaded before Unicode Properties');
  2005. }
  2006. var unicodeData = [
  2007. {
  2008. name: 'ASCII',
  2009. bmp: '\0-\x7F'
  2010. },
  2011. {
  2012. name: 'Alphabetic',
  2013. bmp: 'A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0345\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05B0-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0657\u0659-\u065F\u066E-\u06D3\u06D5-\u06DC\u06E1-\u06E8\u06ED-\u06EF\u06FA-\u06FC\u06FF\u0710-\u073F\u074D-\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0817\u081A-\u082C\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08DF\u08E3-\u08E9\u08F0-\u093B\u093D-\u094C\u094E-\u0950\u0955-\u0963\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD-\u09C4\u09C7\u09C8\u09CB\u09CC\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09F0\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3E-\u0A42\u0A47\u0A48\u0A4B\u0A4C\u0A51\u0A59-\u0A5C\u0A5E\u0A70-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD-\u0AC5\u0AC7-\u0AC9\u0ACB\u0ACC\u0AD0\u0AE0-\u0AE3\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D-\u0B44\u0B47\u0B48\u0B4B\u0B4C\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0BD0\u0BD7\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4C\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCC\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4C\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E46\u0E4D\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0ECD\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F71-\u0F81\u0F88-\u0F97\u0F99-\u0FBC\u1000-\u1036\u1038\u103B-\u103F\u1050-\u1062\u1065-\u1068\u106E-\u1086\u108E\u109C\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1713\u1720-\u1733\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17B3\u17B6-\u17C8\u17D7\u17DC\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u1938\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A1B\u1A20-\u1A5E\u1A61-\u1A74\u1AA7\u1B00-\u1B33\u1B35-\u1B43\u1B45-\u1B4B\u1B80-\u1BA9\u1BAC-\u1BAF\u1BBA-\u1BE5\u1BE7-\u1BF1\u1C00-\u1C35\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1D00-\u1DBF\u1DE7-\u1DF4\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u24B6-\u24E9\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA674-\uA67B\uA67F-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA827\uA840-\uA873\uA880-\uA8C3\uA8C5\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA92A\uA930-\uA952\uA960-\uA97C\uA980-\uA9B2\uA9B4-\uA9BF\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA60-\uAA76\uAA7A\uAA7E-\uAABE\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF5\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC',
  2014. astral: '\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC45\uDC82-\uDCB8\uDCD0-\uDCE8\uDD00-\uDD32\uDD50-\uDD72\uDD76\uDD80-\uDDBF\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE34\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEE8\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D-\uDF44\uDF47\uDF48\uDF4B\uDF4C\uDF50\uDF57\uDF5D-\uDF63]|\uD805[\uDC00-\uDC41\uDC43-\uDC45\uDC47-\uDC4A\uDC80-\uDCC1\uDCC4\uDCC5\uDCC7\uDD80-\uDDB5\uDDB8-\uDDBE\uDDD8-\uDDDD\uDE00-\uDE3E\uDE40\uDE44\uDE80-\uDEB5\uDF00-\uDF19\uDF1D-\uDF2A]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC3E\uDC40\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF36\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF93-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9E]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD47]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD30-\uDD49\uDD50-\uDD69\uDD70-\uDD89]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]'
  2015. },
  2016. {
  2017. name: 'Any',
  2018. isBmpLast: true,
  2019. bmp: '\0-\uFFFF',
  2020. astral: '[\uD800-\uDBFF][\uDC00-\uDFFF]'
  2021. },
  2022. {
  2023. name: 'Default_Ignorable_Code_Point',
  2024. bmp: '\xAD\u034F\u061C\u115F\u1160\u17B4\u17B5\u180B-\u180E\u200B-\u200F\u202A-\u202E\u2060-\u206F\u3164\uFE00-\uFE0F\uFEFF\uFFA0\uFFF0-\uFFF8',
  2025. astral: '\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|[\uDB40-\uDB43][\uDC00-\uDFFF]'
  2026. },
  2027. {
  2028. name: 'Lowercase',
  2029. bmp: 'a-z\xAA\xB5\xBA\xDF-\xF6\xF8-\xFF\u0101\u0103\u0105\u0107\u0109\u010B\u010D\u010F\u0111\u0113\u0115\u0117\u0119\u011B\u011D\u011F\u0121\u0123\u0125\u0127\u0129\u012B\u012D\u012F\u0131\u0133\u0135\u0137\u0138\u013A\u013C\u013E\u0140\u0142\u0144\u0146\u0148\u0149\u014B\u014D\u014F\u0151\u0153\u0155\u0157\u0159\u015B\u015D\u015F\u0161\u0163\u0165\u0167\u0169\u016B\u016D\u016F\u0171\u0173\u0175\u0177\u017A\u017C\u017E-\u0180\u0183\u0185\u0188\u018C\u018D\u0192\u0195\u0199-\u019B\u019E\u01A1\u01A3\u01A5\u01A8\u01AA\u01AB\u01AD\u01B0\u01B4\u01B6\u01B9\u01BA\u01BD-\u01BF\u01C6\u01C9\u01CC\u01CE\u01D0\u01D2\u01D4\u01D6\u01D8\u01DA\u01DC\u01DD\u01DF\u01E1\u01E3\u01E5\u01E7\u01E9\u01EB\u01ED\u01EF\u01F0\u01F3\u01F5\u01F9\u01FB\u01FD\u01FF\u0201\u0203\u0205\u0207\u0209\u020B\u020D\u020F\u0211\u0213\u0215\u0217\u0219\u021B\u021D\u021F\u0221\u0223\u0225\u0227\u0229\u022B\u022D\u022F\u0231\u0233-\u0239\u023C\u023F\u0240\u0242\u0247\u0249\u024B\u024D\u024F-\u0293\u0295-\u02B8\u02C0\u02C1\u02E0-\u02E4\u0345\u0371\u0373\u0377\u037A-\u037D\u0390\u03AC-\u03CE\u03D0\u03D1\u03D5-\u03D7\u03D9\u03DB\u03DD\u03DF\u03E1\u03E3\u03E5\u03E7\u03E9\u03EB\u03ED\u03EF-\u03F3\u03F5\u03F8\u03FB\u03FC\u0430-\u045F\u0461\u0463\u0465\u0467\u0469\u046B\u046D\u046F\u0471\u0473\u0475\u0477\u0479\u047B\u047D\u047F\u0481\u048B\u048D\u048F\u0491\u0493\u0495\u0497\u0499\u049B\u049D\u049F\u04A1\u04A3\u04A5\u04A7\u04A9\u04AB\u04AD\u04AF\u04B1\u04B3\u04B5\u04B7\u04B9\u04BB\u04BD\u04BF\u04C2\u04C4\u04C6\u04C8\u04CA\u04CC\u04CE\u04CF\u04D1\u04D3\u04D5\u04D7\u04D9\u04DB\u04DD\u04DF\u04E1\u04E3\u04E5\u04E7\u04E9\u04EB\u04ED\u04EF\u04F1\u04F3\u04F5\u04F7\u04F9\u04FB\u04FD\u04FF\u0501\u0503\u0505\u0507\u0509\u050B\u050D\u050F\u0511\u0513\u0515\u0517\u0519\u051B\u051D\u051F\u0521\u0523\u0525\u0527\u0529\u052B\u052D\u052F\u0561-\u0587\u13F8-\u13FD\u1C80-\u1C88\u1D00-\u1DBF\u1E01\u1E03\u1E05\u1E07\u1E09\u1E0B\u1E0D\u1E0F\u1E11\u1E13\u1E15\u1E17\u1E19\u1E1B\u1E1D\u1E1F\u1E21\u1E23\u1E25\u1E27\u1E29\u1E2B\u1E2D\u1E2F\u1E31\u1E33\u1E35\u1E37\u1E39\u1E3B\u1E3D\u1E3F\u1E41\u1E43\u1E45\u1E47\u1E49\u1E4B\u1E4D\u1E4F\u1E51\u1E53\u1E55\u1E57\u1E59\u1E5B\u1E5D\u1E5F\u1E61\u1E63\u1E65\u1E67\u1E69\u1E6B\u1E6D\u1E6F\u1E71\u1E73\u1E75\u1E77\u1E79\u1E7B\u1E7D\u1E7F\u1E81\u1E83\u1E85\u1E87\u1E89\u1E8B\u1E8D\u1E8F\u1E91\u1E93\u1E95-\u1E9D\u1E9F\u1EA1\u1EA3\u1EA5\u1EA7\u1EA9\u1EAB\u1EAD\u1EAF\u1EB1\u1EB3\u1EB5\u1EB7\u1EB9\u1EBB\u1EBD\u1EBF\u1EC1\u1EC3\u1EC5\u1EC7\u1EC9\u1ECB\u1ECD\u1ECF\u1ED1\u1ED3\u1ED5\u1ED7\u1ED9\u1EDB\u1EDD\u1EDF\u1EE1\u1EE3\u1EE5\u1EE7\u1EE9\u1EEB\u1EED\u1EEF\u1EF1\u1EF3\u1EF5\u1EF7\u1EF9\u1EFB\u1EFD\u1EFF-\u1F07\u1F10-\u1F15\u1F20-\u1F27\u1F30-\u1F37\u1F40-\u1F45\u1F50-\u1F57\u1F60-\u1F67\u1F70-\u1F7D\u1F80-\u1F87\u1F90-\u1F97\u1FA0-\u1FA7\u1FB0-\u1FB4\u1FB6\u1FB7\u1FBE\u1FC2-\u1FC4\u1FC6\u1FC7\u1FD0-\u1FD3\u1FD6\u1FD7\u1FE0-\u1FE7\u1FF2-\u1FF4\u1FF6\u1FF7\u2071\u207F\u2090-\u209C\u210A\u210E\u210F\u2113\u212F\u2134\u2139\u213C\u213D\u2146-\u2149\u214E\u2170-\u217F\u2184\u24D0-\u24E9\u2C30-\u2C5E\u2C61\u2C65\u2C66\u2C68\u2C6A\u2C6C\u2C71\u2C73\u2C74\u2C76-\u2C7D\u2C81\u2C83\u2C85\u2C87\u2C89\u2C8B\u2C8D\u2C8F\u2C91\u2C93\u2C95\u2C97\u2C99\u2C9B\u2C9D\u2C9F\u2CA1\u2CA3\u2CA5\u2CA7\u2CA9\u2CAB\u2CAD\u2CAF\u2CB1\u2CB3\u2CB5\u2CB7\u2CB9\u2CBB\u2CBD\u2CBF\u2CC1\u2CC3\u2CC5\u2CC7\u2CC9\u2CCB\u2CCD\u2CCF\u2CD1\u2CD3\u2CD5\u2CD7\u2CD9\u2CDB\u2CDD\u2CDF\u2CE1\u2CE3\u2CE4\u2CEC\u2CEE\u2CF3\u2D00-\u2D25\u2D27\u2D2D\uA641\uA643\uA645\uA647\uA649\uA64B\uA64D\uA64F\uA651\uA653\uA655\uA657\uA659\uA65B\uA65D\uA65F\uA661\uA663\uA665\uA667\uA669\uA66B\uA66D\uA681\uA683\uA685\uA687\uA689\uA68B\uA68D\uA68F\uA691\uA693\uA695\uA697\uA699\uA69B-\uA69D\uA723\uA725\uA727\uA729\uA72B\uA72D\uA72F-\uA731\uA733\uA735\uA737\uA739\uA73B\uA73D\uA73F\uA741\uA743\uA745\uA747\uA749\uA74B\uA74D\uA74F\uA751\uA753\uA755\uA757\uA759\uA75B\uA75D\uA75F\uA761\uA763\uA765\uA767\uA769\uA76B\uA76D\uA76F-\uA778\uA77A\uA77C\uA77F\uA781\uA783\uA785\uA787\uA78C\uA78E\uA791\uA793-\uA795\uA797\uA799\uA79B\uA79D\uA79F\uA7A1\uA7A3\uA7A5\uA7A7\uA7A9\uA7B5\uA7B7\uA7F8-\uA7FA\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABBF\uFB00-\uFB06\uFB13-\uFB17\uFF41-\uFF5A',
  2030. astral: '\uD801[\uDC28-\uDC4F\uDCD8-\uDCFB]|\uD803[\uDCC0-\uDCF2]|\uD806[\uDCC0-\uDCDF]|\uD835[\uDC1A-\uDC33\uDC4E-\uDC54\uDC56-\uDC67\uDC82-\uDC9B\uDCB6-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDCEA-\uDD03\uDD1E-\uDD37\uDD52-\uDD6B\uDD86-\uDD9F\uDDBA-\uDDD3\uDDEE-\uDE07\uDE22-\uDE3B\uDE56-\uDE6F\uDE8A-\uDEA5\uDEC2-\uDEDA\uDEDC-\uDEE1\uDEFC-\uDF14\uDF16-\uDF1B\uDF36-\uDF4E\uDF50-\uDF55\uDF70-\uDF88\uDF8A-\uDF8F\uDFAA-\uDFC2\uDFC4-\uDFC9\uDFCB]|\uD83A[\uDD22-\uDD43]'
  2031. },
  2032. {
  2033. name: 'Noncharacter_Code_Point',
  2034. bmp: '\uFDD0-\uFDEF\uFFFE\uFFFF',
  2035. astral: '[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDFFE\uDFFF]'
  2036. },
  2037. {
  2038. name: 'Uppercase',
  2039. bmp: 'A-Z\xC0-\xD6\xD8-\xDE\u0100\u0102\u0104\u0106\u0108\u010A\u010C\u010E\u0110\u0112\u0114\u0116\u0118\u011A\u011C\u011E\u0120\u0122\u0124\u0126\u0128\u012A\u012C\u012E\u0130\u0132\u0134\u0136\u0139\u013B\u013D\u013F\u0141\u0143\u0145\u0147\u014A\u014C\u014E\u0150\u0152\u0154\u0156\u0158\u015A\u015C\u015E\u0160\u0162\u0164\u0166\u0168\u016A\u016C\u016E\u0170\u0172\u0174\u0176\u0178\u0179\u017B\u017D\u0181\u0182\u0184\u0186\u0187\u0189-\u018B\u018E-\u0191\u0193\u0194\u0196-\u0198\u019C\u019D\u019F\u01A0\u01A2\u01A4\u01A6\u01A7\u01A9\u01AC\u01AE\u01AF\u01B1-\u01B3\u01B5\u01B7\u01B8\u01BC\u01C4\u01C7\u01CA\u01CD\u01CF\u01D1\u01D3\u01D5\u01D7\u01D9\u01DB\u01DE\u01E0\u01E2\u01E4\u01E6\u01E8\u01EA\u01EC\u01EE\u01F1\u01F4\u01F6-\u01F8\u01FA\u01FC\u01FE\u0200\u0202\u0204\u0206\u0208\u020A\u020C\u020E\u0210\u0212\u0214\u0216\u0218\u021A\u021C\u021E\u0220\u0222\u0224\u0226\u0228\u022A\u022C\u022E\u0230\u0232\u023A\u023B\u023D\u023E\u0241\u0243-\u0246\u0248\u024A\u024C\u024E\u0370\u0372\u0376\u037F\u0386\u0388-\u038A\u038C\u038E\u038F\u0391-\u03A1\u03A3-\u03AB\u03CF\u03D2-\u03D4\u03D8\u03DA\u03DC\u03DE\u03E0\u03E2\u03E4\u03E6\u03E8\u03EA\u03EC\u03EE\u03F4\u03F7\u03F9\u03FA\u03FD-\u042F\u0460\u0462\u0464\u0466\u0468\u046A\u046C\u046E\u0470\u0472\u0474\u0476\u0478\u047A\u047C\u047E\u0480\u048A\u048C\u048E\u0490\u0492\u0494\u0496\u0498\u049A\u049C\u049E\u04A0\u04A2\u04A4\u04A6\u04A8\u04AA\u04AC\u04AE\u04B0\u04B2\u04B4\u04B6\u04B8\u04BA\u04BC\u04BE\u04C0\u04C1\u04C3\u04C5\u04C7\u04C9\u04CB\u04CD\u04D0\u04D2\u04D4\u04D6\u04D8\u04DA\u04DC\u04DE\u04E0\u04E2\u04E4\u04E6\u04E8\u04EA\u04EC\u04EE\u04F0\u04F2\u04F4\u04F6\u04F8\u04FA\u04FC\u04FE\u0500\u0502\u0504\u0506\u0508\u050A\u050C\u050E\u0510\u0512\u0514\u0516\u0518\u051A\u051C\u051E\u0520\u0522\u0524\u0526\u0528\u052A\u052C\u052E\u0531-\u0556\u10A0-\u10C5\u10C7\u10CD\u13A0-\u13F5\u1E00\u1E02\u1E04\u1E06\u1E08\u1E0A\u1E0C\u1E0E\u1E10\u1E12\u1E14\u1E16\u1E18\u1E1A\u1E1C\u1E1E\u1E20\u1E22\u1E24\u1E26\u1E28\u1E2A\u1E2C\u1E2E\u1E30\u1E32\u1E34\u1E36\u1E38\u1E3A\u1E3C\u1E3E\u1E40\u1E42\u1E44\u1E46\u1E48\u1E4A\u1E4C\u1E4E\u1E50\u1E52\u1E54\u1E56\u1E58\u1E5A\u1E5C\u1E5E\u1E60\u1E62\u1E64\u1E66\u1E68\u1E6A\u1E6C\u1E6E\u1E70\u1E72\u1E74\u1E76\u1E78\u1E7A\u1E7C\u1E7E\u1E80\u1E82\u1E84\u1E86\u1E88\u1E8A\u1E8C\u1E8E\u1E90\u1E92\u1E94\u1E9E\u1EA0\u1EA2\u1EA4\u1EA6\u1EA8\u1EAA\u1EAC\u1EAE\u1EB0\u1EB2\u1EB4\u1EB6\u1EB8\u1EBA\u1EBC\u1EBE\u1EC0\u1EC2\u1EC4\u1EC6\u1EC8\u1ECA\u1ECC\u1ECE\u1ED0\u1ED2\u1ED4\u1ED6\u1ED8\u1EDA\u1EDC\u1EDE\u1EE0\u1EE2\u1EE4\u1EE6\u1EE8\u1EEA\u1EEC\u1EEE\u1EF0\u1EF2\u1EF4\u1EF6\u1EF8\u1EFA\u1EFC\u1EFE\u1F08-\u1F0F\u1F18-\u1F1D\u1F28-\u1F2F\u1F38-\u1F3F\u1F48-\u1F4D\u1F59\u1F5B\u1F5D\u1F5F\u1F68-\u1F6F\u1FB8-\u1FBB\u1FC8-\u1FCB\u1FD8-\u1FDB\u1FE8-\u1FEC\u1FF8-\u1FFB\u2102\u2107\u210B-\u210D\u2110-\u2112\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u2130-\u2133\u213E\u213F\u2145\u2160-\u216F\u2183\u24B6-\u24CF\u2C00-\u2C2E\u2C60\u2C62-\u2C64\u2C67\u2C69\u2C6B\u2C6D-\u2C70\u2C72\u2C75\u2C7E-\u2C80\u2C82\u2C84\u2C86\u2C88\u2C8A\u2C8C\u2C8E\u2C90\u2C92\u2C94\u2C96\u2C98\u2C9A\u2C9C\u2C9E\u2CA0\u2CA2\u2CA4\u2CA6\u2CA8\u2CAA\u2CAC\u2CAE\u2CB0\u2CB2\u2CB4\u2CB6\u2CB8\u2CBA\u2CBC\u2CBE\u2CC0\u2CC2\u2CC4\u2CC6\u2CC8\u2CCA\u2CCC\u2CCE\u2CD0\u2CD2\u2CD4\u2CD6\u2CD8\u2CDA\u2CDC\u2CDE\u2CE0\u2CE2\u2CEB\u2CED\u2CF2\uA640\uA642\uA644\uA646\uA648\uA64A\uA64C\uA64E\uA650\uA652\uA654\uA656\uA658\uA65A\uA65C\uA65E\uA660\uA662\uA664\uA666\uA668\uA66A\uA66C\uA680\uA682\uA684\uA686\uA688\uA68A\uA68C\uA68E\uA690\uA692\uA694\uA696\uA698\uA69A\uA722\uA724\uA726\uA728\uA72A\uA72C\uA72E\uA732\uA734\uA736\uA738\uA73A\uA73C\uA73E\uA740\uA742\uA744\uA746\uA748\uA74A\uA74C\uA74E\uA750\uA752\uA754\uA756\uA758\uA75A\uA75C\uA75E\uA760\uA762\uA764\uA766\uA768\uA76A\uA76C\uA76E\uA779\uA77B\uA77D\uA77E\uA780\uA782\uA784\uA786\uA78B\uA78D\uA790\uA792\uA796\uA798\uA79A\uA79C\uA79E\uA7A0\uA7A2\uA7A4\uA7A6\uA7A8\uA7AA-\uA7AE\uA7B0-\uA7B4\uA7B6\uFF21-\uFF3A',
  2040. astral: '\uD801[\uDC00-\uDC27\uDCB0-\uDCD3]|\uD803[\uDC80-\uDCB2]|\uD806[\uDCA0-\uDCBF]|\uD835[\uDC00-\uDC19\uDC34-\uDC4D\uDC68-\uDC81\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB5\uDCD0-\uDCE9\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD38\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD6C-\uDD85\uDDA0-\uDDB9\uDDD4-\uDDED\uDE08-\uDE21\uDE3C-\uDE55\uDE70-\uDE89\uDEA8-\uDEC0\uDEE2-\uDEFA\uDF1C-\uDF34\uDF56-\uDF6E\uDF90-\uDFA8\uDFCA]|\uD83A[\uDD00-\uDD21]|\uD83C[\uDD30-\uDD49\uDD50-\uDD69\uDD70-\uDD89]'
  2041. },
  2042. {
  2043. name: 'White_Space',
  2044. bmp: '\x09-\x0D\x20\x85\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000'
  2045. }
  2046. ];
  2047. // Add non-generated data
  2048. unicodeData.push({
  2049. name: 'Assigned',
  2050. // Since this is defined as the inverse of Unicode category Cn (Unassigned), the Unicode
  2051. // Categories addon is required to use this property
  2052. inverseOf: 'Cn'
  2053. });
  2054. XRegExp.addUnicodeData(unicodeData);
  2055. };
  2056. },{}],7:[function(require,module,exports){
  2057. /*!
  2058. * XRegExp Unicode Scripts 3.2.0
  2059. * <xregexp.com>
  2060. * Steven Levithan (c) 2010-2017 MIT License
  2061. * Unicode data by Mathias Bynens <mathiasbynens.be>
  2062. */
  2063. module.exports = function(XRegExp) {
  2064. 'use strict';
  2065. /**
  2066. * Adds support for all Unicode scripts. E.g., `\p{Latin}`. Token names are case insensitive,
  2067. * and any spaces, hyphens, and underscores are ignored.
  2068. *
  2069. * Uses Unicode 9.0.0.
  2070. *
  2071. * @requires XRegExp, Unicode Base
  2072. */
  2073. if (!XRegExp.addUnicodeData) {
  2074. throw new ReferenceError('Unicode Base must be loaded before Unicode Scripts');
  2075. }
  2076. XRegExp.addUnicodeData([
  2077. {
  2078. name: 'Adlam',
  2079. astral: '\uD83A[\uDD00-\uDD4A\uDD50-\uDD59\uDD5E\uDD5F]'
  2080. },
  2081. {
  2082. name: 'Ahom',
  2083. astral: '\uD805[\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF3F]'
  2084. },
  2085. {
  2086. name: 'Anatolian_Hieroglyphs',
  2087. astral: '\uD811[\uDC00-\uDE46]'
  2088. },
  2089. {
  2090. name: 'Arabic',
  2091. bmp: '\u0600-\u0604\u0606-\u060B\u060D-\u061A\u061E\u0620-\u063F\u0641-\u064A\u0656-\u066F\u0671-\u06DC\u06DE-\u06FF\u0750-\u077F\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u08FF\uFB50-\uFBC1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFD\uFE70-\uFE74\uFE76-\uFEFC',
  2092. astral: '\uD803[\uDE60-\uDE7E]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB\uDEF0\uDEF1]'
  2093. },
  2094. {
  2095. name: 'Armenian',
  2096. bmp: '\u0531-\u0556\u0559-\u055F\u0561-\u0587\u058A\u058D-\u058F\uFB13-\uFB17'
  2097. },
  2098. {
  2099. name: 'Avestan',
  2100. astral: '\uD802[\uDF00-\uDF35\uDF39-\uDF3F]'
  2101. },
  2102. {
  2103. name: 'Balinese',
  2104. bmp: '\u1B00-\u1B4B\u1B50-\u1B7C'
  2105. },
  2106. {
  2107. name: 'Bamum',
  2108. bmp: '\uA6A0-\uA6F7',
  2109. astral: '\uD81A[\uDC00-\uDE38]'
  2110. },
  2111. {
  2112. name: 'Bassa_Vah',
  2113. astral: '\uD81A[\uDED0-\uDEED\uDEF0-\uDEF5]'
  2114. },
  2115. {
  2116. name: 'Batak',
  2117. bmp: '\u1BC0-\u1BF3\u1BFC-\u1BFF'
  2118. },
  2119. {
  2120. name: 'Bengali',
  2121. bmp: '\u0980-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09FB'
  2122. },
  2123. {
  2124. name: 'Bhaiksuki',
  2125. astral: '\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC45\uDC50-\uDC6C]'
  2126. },
  2127. {
  2128. name: 'Bopomofo',
  2129. bmp: '\u02EA\u02EB\u3105-\u312D\u31A0-\u31BA'
  2130. },
  2131. {
  2132. name: 'Brahmi',
  2133. astral: '\uD804[\uDC00-\uDC4D\uDC52-\uDC6F\uDC7F]'
  2134. },
  2135. {
  2136. name: 'Braille',
  2137. bmp: '\u2800-\u28FF'
  2138. },
  2139. {
  2140. name: 'Buginese',
  2141. bmp: '\u1A00-\u1A1B\u1A1E\u1A1F'
  2142. },
  2143. {
  2144. name: 'Buhid',
  2145. bmp: '\u1740-\u1753'
  2146. },
  2147. {
  2148. name: 'Canadian_Aboriginal',
  2149. bmp: '\u1400-\u167F\u18B0-\u18F5'
  2150. },
  2151. {
  2152. name: 'Carian',
  2153. astral: '\uD800[\uDEA0-\uDED0]'
  2154. },
  2155. {
  2156. name: 'Caucasian_Albanian',
  2157. astral: '\uD801[\uDD30-\uDD63\uDD6F]'
  2158. },
  2159. {
  2160. name: 'Chakma',
  2161. astral: '\uD804[\uDD00-\uDD34\uDD36-\uDD43]'
  2162. },
  2163. {
  2164. name: 'Cham',
  2165. bmp: '\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA5C-\uAA5F'
  2166. },
  2167. {
  2168. name: 'Cherokee',
  2169. bmp: '\u13A0-\u13F5\u13F8-\u13FD\uAB70-\uABBF'
  2170. },
  2171. {
  2172. name: 'Common',
  2173. bmp: '\0-\x40\\x5B-\x60\\x7B-\xA9\xAB-\xB9\xBB-\xBF\xD7\xF7\u02B9-\u02DF\u02E5-\u02E9\u02EC-\u02FF\u0374\u037E\u0385\u0387\u0589\u0605\u060C\u061B\u061C\u061F\u0640\u06DD\u08E2\u0964\u0965\u0E3F\u0FD5-\u0FD8\u10FB\u16EB-\u16ED\u1735\u1736\u1802\u1803\u1805\u1CD3\u1CE1\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u2000-\u200B\u200E-\u2064\u2066-\u2070\u2074-\u207E\u2080-\u208E\u20A0-\u20BE\u2100-\u2125\u2127-\u2129\u212C-\u2131\u2133-\u214D\u214F-\u215F\u2189-\u218B\u2190-\u23FE\u2400-\u2426\u2440-\u244A\u2460-\u27FF\u2900-\u2B73\u2B76-\u2B95\u2B98-\u2BB9\u2BBD-\u2BC8\u2BCA-\u2BD1\u2BEC-\u2BEF\u2E00-\u2E44\u2FF0-\u2FFB\u3000-\u3004\u3006\u3008-\u3020\u3030-\u3037\u303C-\u303F\u309B\u309C\u30A0\u30FB\u30FC\u3190-\u319F\u31C0-\u31E3\u3220-\u325F\u327F-\u32CF\u3358-\u33FF\u4DC0-\u4DFF\uA700-\uA721\uA788-\uA78A\uA830-\uA839\uA92E\uA9CF\uAB5B\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFEFF\uFF01-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFF70\uFF9E\uFF9F\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFF9-\uFFFD',
  2174. astral: '\uD800[\uDD00-\uDD02\uDD07-\uDD33\uDD37-\uDD3F\uDD90-\uDD9B\uDDD0-\uDDFC\uDEE1-\uDEFB]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD66\uDD6A-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDE8\uDF00-\uDF56\uDF60-\uDF71]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDFCB\uDFCE-\uDFFF]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD00-\uDD0C\uDD10-\uDD2E\uDD30-\uDD6B\uDD70-\uDDAC\uDDE6-\uDDFF\uDE01\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED2\uDEE0-\uDEEC\uDEF0-\uDEF6\uDF00-\uDF73\uDF80-\uDFD4]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDD10-\uDD1E\uDD20-\uDD27\uDD30\uDD33-\uDD3E\uDD40-\uDD4B\uDD50-\uDD5E\uDD80-\uDD91\uDDC0]|\uDB40[\uDC01\uDC20-\uDC7F]'
  2175. },
  2176. {
  2177. name: 'Coptic',
  2178. bmp: '\u03E2-\u03EF\u2C80-\u2CF3\u2CF9-\u2CFF'
  2179. },
  2180. {
  2181. name: 'Cuneiform',
  2182. astral: '\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC70-\uDC74\uDC80-\uDD43]'
  2183. },
  2184. {
  2185. name: 'Cypriot',
  2186. astral: '\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F]'
  2187. },
  2188. {
  2189. name: 'Cyrillic',
  2190. bmp: '\u0400-\u0484\u0487-\u052F\u1C80-\u1C88\u1D2B\u1D78\u2DE0-\u2DFF\uA640-\uA69F\uFE2E\uFE2F'
  2191. },
  2192. {
  2193. name: 'Deseret',
  2194. astral: '\uD801[\uDC00-\uDC4F]'
  2195. },
  2196. {
  2197. name: 'Devanagari',
  2198. bmp: '\u0900-\u0950\u0953-\u0963\u0966-\u097F\uA8E0-\uA8FD'
  2199. },
  2200. {
  2201. name: 'Duployan',
  2202. astral: '\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9C-\uDC9F]'
  2203. },
  2204. {
  2205. name: 'Egyptian_Hieroglyphs',
  2206. astral: '\uD80C[\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]'
  2207. },
  2208. {
  2209. name: 'Elbasan',
  2210. astral: '\uD801[\uDD00-\uDD27]'
  2211. },
  2212. {
  2213. name: 'Ethiopic',
  2214. bmp: '\u1200-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u137C\u1380-\u1399\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E'
  2215. },
  2216. {
  2217. name: 'Georgian',
  2218. bmp: '\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u10FF\u2D00-\u2D25\u2D27\u2D2D'
  2219. },
  2220. {
  2221. name: 'Glagolitic',
  2222. bmp: '\u2C00-\u2C2E\u2C30-\u2C5E',
  2223. astral: '\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]'
  2224. },
  2225. {
  2226. name: 'Gothic',
  2227. astral: '\uD800[\uDF30-\uDF4A]'
  2228. },
  2229. {
  2230. name: 'Grantha',
  2231. astral: '\uD804[\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]'
  2232. },
  2233. {
  2234. name: 'Greek',
  2235. bmp: '\u0370-\u0373\u0375-\u0377\u037A-\u037D\u037F\u0384\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03E1\u03F0-\u03FF\u1D26-\u1D2A\u1D5D-\u1D61\u1D66-\u1D6A\u1DBF\u1F00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FC4\u1FC6-\u1FD3\u1FD6-\u1FDB\u1FDD-\u1FEF\u1FF2-\u1FF4\u1FF6-\u1FFE\u2126\uAB65',
  2236. astral: '\uD800[\uDD40-\uDD8E\uDDA0]|\uD834[\uDE00-\uDE45]'
  2237. },
  2238. {
  2239. name: 'Gujarati',
  2240. bmp: '\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AF1\u0AF9'
  2241. },
  2242. {
  2243. name: 'Gurmukhi',
  2244. bmp: '\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75'
  2245. },
  2246. {
  2247. name: 'Han',
  2248. bmp: '\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u3005\u3007\u3021-\u3029\u3038-\u303B\u3400-\u4DB5\u4E00-\u9FD5\uF900-\uFA6D\uFA70-\uFAD9',
  2249. astral: '[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]'
  2250. },
  2251. {
  2252. name: 'Hangul',
  2253. bmp: '\u1100-\u11FF\u302E\u302F\u3131-\u318E\u3200-\u321E\u3260-\u327E\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uFFA0-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC'
  2254. },
  2255. {
  2256. name: 'Hanunoo',
  2257. bmp: '\u1720-\u1734'
  2258. },
  2259. {
  2260. name: 'Hatran',
  2261. astral: '\uD802[\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDCFF]'
  2262. },
  2263. {
  2264. name: 'Hebrew',
  2265. bmp: '\u0591-\u05C7\u05D0-\u05EA\u05F0-\u05F4\uFB1D-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFB4F'
  2266. },
  2267. {
  2268. name: 'Hiragana',
  2269. bmp: '\u3041-\u3096\u309D-\u309F',
  2270. astral: '\uD82C\uDC01|\uD83C\uDE00'
  2271. },
  2272. {
  2273. name: 'Imperial_Aramaic',
  2274. astral: '\uD802[\uDC40-\uDC55\uDC57-\uDC5F]'
  2275. },
  2276. {
  2277. name: 'Inherited',
  2278. bmp: '\u0300-\u036F\u0485\u0486\u064B-\u0655\u0670\u0951\u0952\u1AB0-\u1ABE\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFB-\u1DFF\u200C\u200D\u20D0-\u20F0\u302A-\u302D\u3099\u309A\uFE00-\uFE0F\uFE20-\uFE2D',
  2279. astral: '\uD800[\uDDFD\uDEE0]|\uD834[\uDD67-\uDD69\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD]|\uDB40[\uDD00-\uDDEF]'
  2280. },
  2281. {
  2282. name: 'Inscriptional_Pahlavi',
  2283. astral: '\uD802[\uDF60-\uDF72\uDF78-\uDF7F]'
  2284. },
  2285. {
  2286. name: 'Inscriptional_Parthian',
  2287. astral: '\uD802[\uDF40-\uDF55\uDF58-\uDF5F]'
  2288. },
  2289. {
  2290. name: 'Javanese',
  2291. bmp: '\uA980-\uA9CD\uA9D0-\uA9D9\uA9DE\uA9DF'
  2292. },
  2293. {
  2294. name: 'Kaithi',
  2295. astral: '\uD804[\uDC80-\uDCC1]'
  2296. },
  2297. {
  2298. name: 'Kannada',
  2299. bmp: '\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2'
  2300. },
  2301. {
  2302. name: 'Katakana',
  2303. bmp: '\u30A1-\u30FA\u30FD-\u30FF\u31F0-\u31FF\u32D0-\u32FE\u3300-\u3357\uFF66-\uFF6F\uFF71-\uFF9D',
  2304. astral: '\uD82C\uDC00'
  2305. },
  2306. {
  2307. name: 'Kayah_Li',
  2308. bmp: '\uA900-\uA92D\uA92F'
  2309. },
  2310. {
  2311. name: 'Kharoshthi',
  2312. astral: '\uD802[\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F-\uDE47\uDE50-\uDE58]'
  2313. },
  2314. {
  2315. name: 'Khmer',
  2316. bmp: '\u1780-\u17DD\u17E0-\u17E9\u17F0-\u17F9\u19E0-\u19FF'
  2317. },
  2318. {
  2319. name: 'Khojki',
  2320. astral: '\uD804[\uDE00-\uDE11\uDE13-\uDE3E]'
  2321. },
  2322. {
  2323. name: 'Khudawadi',
  2324. astral: '\uD804[\uDEB0-\uDEEA\uDEF0-\uDEF9]'
  2325. },
  2326. {
  2327. name: 'Lao',
  2328. bmp: '\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF'
  2329. },
  2330. {
  2331. name: 'Latin',
  2332. bmp: 'A-Za-z\xAA\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u02E0-\u02E4\u1D00-\u1D25\u1D2C-\u1D5C\u1D62-\u1D65\u1D6B-\u1D77\u1D79-\u1DBE\u1E00-\u1EFF\u2071\u207F\u2090-\u209C\u212A\u212B\u2132\u214E\u2160-\u2188\u2C60-\u2C7F\uA722-\uA787\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA7FF\uAB30-\uAB5A\uAB5C-\uAB64\uFB00-\uFB06\uFF21-\uFF3A\uFF41-\uFF5A'
  2333. },
  2334. {
  2335. name: 'Lepcha',
  2336. bmp: '\u1C00-\u1C37\u1C3B-\u1C49\u1C4D-\u1C4F'
  2337. },
  2338. {
  2339. name: 'Limbu',
  2340. bmp: '\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1940\u1944-\u194F'
  2341. },
  2342. {
  2343. name: 'Linear_A',
  2344. astral: '\uD801[\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]'
  2345. },
  2346. {
  2347. name: 'Linear_B',
  2348. astral: '\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA]'
  2349. },
  2350. {
  2351. name: 'Lisu',
  2352. bmp: '\uA4D0-\uA4FF'
  2353. },
  2354. {
  2355. name: 'Lycian',
  2356. astral: '\uD800[\uDE80-\uDE9C]'
  2357. },
  2358. {
  2359. name: 'Lydian',
  2360. astral: '\uD802[\uDD20-\uDD39\uDD3F]'
  2361. },
  2362. {
  2363. name: 'Mahajani',
  2364. astral: '\uD804[\uDD50-\uDD76]'
  2365. },
  2366. {
  2367. name: 'Malayalam',
  2368. bmp: '\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4F\u0D54-\u0D63\u0D66-\u0D7F'
  2369. },
  2370. {
  2371. name: 'Mandaic',
  2372. bmp: '\u0840-\u085B\u085E'
  2373. },
  2374. {
  2375. name: 'Manichaean',
  2376. astral: '\uD802[\uDEC0-\uDEE6\uDEEB-\uDEF6]'
  2377. },
  2378. {
  2379. name: 'Marchen',
  2380. astral: '\uD807[\uDC70-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6]'
  2381. },
  2382. {
  2383. name: 'Meetei_Mayek',
  2384. bmp: '\uAAE0-\uAAF6\uABC0-\uABED\uABF0-\uABF9'
  2385. },
  2386. {
  2387. name: 'Mende_Kikakui',
  2388. astral: '\uD83A[\uDC00-\uDCC4\uDCC7-\uDCD6]'
  2389. },
  2390. {
  2391. name: 'Meroitic_Cursive',
  2392. astral: '\uD802[\uDDA0-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDDFF]'
  2393. },
  2394. {
  2395. name: 'Meroitic_Hieroglyphs',
  2396. astral: '\uD802[\uDD80-\uDD9F]'
  2397. },
  2398. {
  2399. name: 'Miao',
  2400. astral: '\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]'
  2401. },
  2402. {
  2403. name: 'Modi',
  2404. astral: '\uD805[\uDE00-\uDE44\uDE50-\uDE59]'
  2405. },
  2406. {
  2407. name: 'Mongolian',
  2408. bmp: '\u1800\u1801\u1804\u1806-\u180E\u1810-\u1819\u1820-\u1877\u1880-\u18AA',
  2409. astral: '\uD805[\uDE60-\uDE6C]'
  2410. },
  2411. {
  2412. name: 'Mro',
  2413. astral: '\uD81A[\uDE40-\uDE5E\uDE60-\uDE69\uDE6E\uDE6F]'
  2414. },
  2415. {
  2416. name: 'Multani',
  2417. astral: '\uD804[\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA9]'
  2418. },
  2419. {
  2420. name: 'Myanmar',
  2421. bmp: '\u1000-\u109F\uA9E0-\uA9FE\uAA60-\uAA7F'
  2422. },
  2423. {
  2424. name: 'Nabataean',
  2425. astral: '\uD802[\uDC80-\uDC9E\uDCA7-\uDCAF]'
  2426. },
  2427. {
  2428. name: 'New_Tai_Lue',
  2429. bmp: '\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u19DE\u19DF'
  2430. },
  2431. {
  2432. name: 'Newa',
  2433. astral: '\uD805[\uDC00-\uDC59\uDC5B\uDC5D]'
  2434. },
  2435. {
  2436. name: 'Nko',
  2437. bmp: '\u07C0-\u07FA'
  2438. },
  2439. {
  2440. name: 'Ogham',
  2441. bmp: '\u1680-\u169C'
  2442. },
  2443. {
  2444. name: 'Ol_Chiki',
  2445. bmp: '\u1C50-\u1C7F'
  2446. },
  2447. {
  2448. name: 'Old_Hungarian',
  2449. astral: '\uD803[\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDCFF]'
  2450. },
  2451. {
  2452. name: 'Old_Italic',
  2453. astral: '\uD800[\uDF00-\uDF23]'
  2454. },
  2455. {
  2456. name: 'Old_North_Arabian',
  2457. astral: '\uD802[\uDE80-\uDE9F]'
  2458. },
  2459. {
  2460. name: 'Old_Permic',
  2461. astral: '\uD800[\uDF50-\uDF7A]'
  2462. },
  2463. {
  2464. name: 'Old_Persian',
  2465. astral: '\uD800[\uDFA0-\uDFC3\uDFC8-\uDFD5]'
  2466. },
  2467. {
  2468. name: 'Old_South_Arabian',
  2469. astral: '\uD802[\uDE60-\uDE7F]'
  2470. },
  2471. {
  2472. name: 'Old_Turkic',
  2473. astral: '\uD803[\uDC00-\uDC48]'
  2474. },
  2475. {
  2476. name: 'Oriya',
  2477. bmp: '\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B77'
  2478. },
  2479. {
  2480. name: 'Osage',
  2481. astral: '\uD801[\uDCB0-\uDCD3\uDCD8-\uDCFB]'
  2482. },
  2483. {
  2484. name: 'Osmanya',
  2485. astral: '\uD801[\uDC80-\uDC9D\uDCA0-\uDCA9]'
  2486. },
  2487. {
  2488. name: 'Pahawh_Hmong',
  2489. astral: '\uD81A[\uDF00-\uDF45\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]'
  2490. },
  2491. {
  2492. name: 'Palmyrene',
  2493. astral: '\uD802[\uDC60-\uDC7F]'
  2494. },
  2495. {
  2496. name: 'Pau_Cin_Hau',
  2497. astral: '\uD806[\uDEC0-\uDEF8]'
  2498. },
  2499. {
  2500. name: 'Phags_Pa',
  2501. bmp: '\uA840-\uA877'
  2502. },
  2503. {
  2504. name: 'Phoenician',
  2505. astral: '\uD802[\uDD00-\uDD1B\uDD1F]'
  2506. },
  2507. {
  2508. name: 'Psalter_Pahlavi',
  2509. astral: '\uD802[\uDF80-\uDF91\uDF99-\uDF9C\uDFA9-\uDFAF]'
  2510. },
  2511. {
  2512. name: 'Rejang',
  2513. bmp: '\uA930-\uA953\uA95F'
  2514. },
  2515. {
  2516. name: 'Runic',
  2517. bmp: '\u16A0-\u16EA\u16EE-\u16F8'
  2518. },
  2519. {
  2520. name: 'Samaritan',
  2521. bmp: '\u0800-\u082D\u0830-\u083E'
  2522. },
  2523. {
  2524. name: 'Saurashtra',
  2525. bmp: '\uA880-\uA8C5\uA8CE-\uA8D9'
  2526. },
  2527. {
  2528. name: 'Sharada',
  2529. astral: '\uD804[\uDD80-\uDDCD\uDDD0-\uDDDF]'
  2530. },
  2531. {
  2532. name: 'Shavian',
  2533. astral: '\uD801[\uDC50-\uDC7F]'
  2534. },
  2535. {
  2536. name: 'Siddham',
  2537. astral: '\uD805[\uDD80-\uDDB5\uDDB8-\uDDDD]'
  2538. },
  2539. {
  2540. name: 'SignWriting',
  2541. astral: '\uD836[\uDC00-\uDE8B\uDE9B-\uDE9F\uDEA1-\uDEAF]'
  2542. },
  2543. {
  2544. name: 'Sinhala',
  2545. bmp: '\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2-\u0DF4',
  2546. astral: '\uD804[\uDDE1-\uDDF4]'
  2547. },
  2548. {
  2549. name: 'Sora_Sompeng',
  2550. astral: '\uD804[\uDCD0-\uDCE8\uDCF0-\uDCF9]'
  2551. },
  2552. {
  2553. name: 'Sundanese',
  2554. bmp: '\u1B80-\u1BBF\u1CC0-\u1CC7'
  2555. },
  2556. {
  2557. name: 'Syloti_Nagri',
  2558. bmp: '\uA800-\uA82B'
  2559. },
  2560. {
  2561. name: 'Syriac',
  2562. bmp: '\u0700-\u070D\u070F-\u074A\u074D-\u074F'
  2563. },
  2564. {
  2565. name: 'Tagalog',
  2566. bmp: '\u1700-\u170C\u170E-\u1714'
  2567. },
  2568. {
  2569. name: 'Tagbanwa',
  2570. bmp: '\u1760-\u176C\u176E-\u1770\u1772\u1773'
  2571. },
  2572. {
  2573. name: 'Tai_Le',
  2574. bmp: '\u1950-\u196D\u1970-\u1974'
  2575. },
  2576. {
  2577. name: 'Tai_Tham',
  2578. bmp: '\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA0-\u1AAD'
  2579. },
  2580. {
  2581. name: 'Tai_Viet',
  2582. bmp: '\uAA80-\uAAC2\uAADB-\uAADF'
  2583. },
  2584. {
  2585. name: 'Takri',
  2586. astral: '\uD805[\uDE80-\uDEB7\uDEC0-\uDEC9]'
  2587. },
  2588. {
  2589. name: 'Tamil',
  2590. bmp: '\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BFA'
  2591. },
  2592. {
  2593. name: 'Tangut',
  2594. astral: '\uD81B\uDFE0|[\uD81C-\uD820][\uDC00-\uDFFF]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]'
  2595. },
  2596. {
  2597. name: 'Telugu',
  2598. bmp: '\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C78-\u0C7F'
  2599. },
  2600. {
  2601. name: 'Thaana',
  2602. bmp: '\u0780-\u07B1'
  2603. },
  2604. {
  2605. name: 'Thai',
  2606. bmp: '\u0E01-\u0E3A\u0E40-\u0E5B'
  2607. },
  2608. {
  2609. name: 'Tibetan',
  2610. bmp: '\u0F00-\u0F47\u0F49-\u0F6C\u0F71-\u0F97\u0F99-\u0FBC\u0FBE-\u0FCC\u0FCE-\u0FD4\u0FD9\u0FDA'
  2611. },
  2612. {
  2613. name: 'Tifinagh',
  2614. bmp: '\u2D30-\u2D67\u2D6F\u2D70\u2D7F'
  2615. },
  2616. {
  2617. name: 'Tirhuta',
  2618. astral: '\uD805[\uDC80-\uDCC7\uDCD0-\uDCD9]'
  2619. },
  2620. {
  2621. name: 'Ugaritic',
  2622. astral: '\uD800[\uDF80-\uDF9D\uDF9F]'
  2623. },
  2624. {
  2625. name: 'Vai',
  2626. bmp: '\uA500-\uA62B'
  2627. },
  2628. {
  2629. name: 'Warang_Citi',
  2630. astral: '\uD806[\uDCA0-\uDCF2\uDCFF]'
  2631. },
  2632. {
  2633. name: 'Yi',
  2634. bmp: '\uA000-\uA48C\uA490-\uA4C6'
  2635. }
  2636. ]);
  2637. };
  2638. },{}],8:[function(require,module,exports){
  2639. var XRegExp = require('./xregexp');
  2640. require('./addons/build')(XRegExp);
  2641. require('./addons/matchrecursive')(XRegExp);
  2642. require('./addons/unicode-base')(XRegExp);
  2643. require('./addons/unicode-blocks')(XRegExp);
  2644. require('./addons/unicode-categories')(XRegExp);
  2645. require('./addons/unicode-properties')(XRegExp);
  2646. require('./addons/unicode-scripts')(XRegExp);
  2647. module.exports = XRegExp;
  2648. },{"./addons/build":1,"./addons/matchrecursive":2,"./addons/unicode-base":3,"./addons/unicode-blocks":4,"./addons/unicode-categories":5,"./addons/unicode-properties":6,"./addons/unicode-scripts":7,"./xregexp":9}],9:[function(require,module,exports){
  2649. /*!
  2650. * XRegExp 3.2.0
  2651. * <xregexp.com>
  2652. * Steven Levithan (c) 2007-2017 MIT License
  2653. */
  2654. 'use strict';
  2655. /**
  2656. * XRegExp provides augmented, extensible regular expressions. You get additional regex syntax and
  2657. * flags, beyond what browsers support natively. XRegExp is also a regex utility belt with tools to
  2658. * make your client-side grepping simpler and more powerful, while freeing you from related
  2659. * cross-browser inconsistencies.
  2660. */
  2661. // ==--------------------------==
  2662. // Private stuff
  2663. // ==--------------------------==
  2664. // Property name used for extended regex instance data
  2665. var REGEX_DATA = 'xregexp';
  2666. // Optional features that can be installed and uninstalled
  2667. var features = {
  2668. astral: false,
  2669. natives: false
  2670. };
  2671. // Native methods to use and restore ('native' is an ES3 reserved keyword)
  2672. var nativ = {
  2673. exec: RegExp.prototype.exec,
  2674. test: RegExp.prototype.test,
  2675. match: String.prototype.match,
  2676. replace: String.prototype.replace,
  2677. split: String.prototype.split
  2678. };
  2679. // Storage for fixed/extended native methods
  2680. var fixed = {};
  2681. // Storage for regexes cached by `XRegExp.cache`
  2682. var regexCache = {};
  2683. // Storage for pattern details cached by the `XRegExp` constructor
  2684. var patternCache = {};
  2685. // Storage for regex syntax tokens added internally or by `XRegExp.addToken`
  2686. var tokens = [];
  2687. // Token scopes
  2688. var defaultScope = 'default';
  2689. var classScope = 'class';
  2690. // Regexes that match native regex syntax, including octals
  2691. var nativeTokens = {
  2692. // Any native multicharacter token in default scope, or any single character
  2693. 'default': /\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\d*|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|\(\?(?:[:=!]|<[=!])|[?*+]\?|{\d+(?:,\d*)?}\??|[\s\S]/,
  2694. // Any native multicharacter token in character class scope, or any single character
  2695. 'class': /\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|[\s\S]/
  2696. };
  2697. // Any backreference or dollar-prefixed character in replacement strings
  2698. var replacementToken = /\$(?:{([\w$]+)}|(\d\d?|[\s\S]))/g;
  2699. // Check for correct `exec` handling of nonparticipating capturing groups
  2700. var correctExecNpcg = nativ.exec.call(/()??/, '')[1] === undefined;
  2701. // Check for ES6 `flags` prop support
  2702. var hasFlagsProp = /x/.flags !== undefined;
  2703. // Shortcut to `Object.prototype.toString`
  2704. var toString = {}.toString;
  2705. function hasNativeFlag(flag) {
  2706. // Can't check based on the presence of properties/getters since browsers might support such
  2707. // properties even when they don't support the corresponding flag in regex construction (tested
  2708. // in Chrome 48, where `'unicode' in /x/` is true but trying to construct a regex with flag `u`
  2709. // throws an error)
  2710. var isSupported = true;
  2711. try {
  2712. // Can't use regex literals for testing even in a `try` because regex literals with
  2713. // unsupported flags cause a compilation error in IE
  2714. new RegExp('', flag);
  2715. } catch (exception) {
  2716. isSupported = false;
  2717. }
  2718. return isSupported;
  2719. }
  2720. // Check for ES6 `u` flag support
  2721. var hasNativeU = hasNativeFlag('u');
  2722. // Check for ES6 `y` flag support
  2723. var hasNativeY = hasNativeFlag('y');
  2724. // Tracker for known flags, including addon flags
  2725. var registeredFlags = {
  2726. g: true,
  2727. i: true,
  2728. m: true,
  2729. u: hasNativeU,
  2730. y: hasNativeY
  2731. };
  2732. /**
  2733. * Attaches extended data and `XRegExp.prototype` properties to a regex object.
  2734. *
  2735. * @private
  2736. * @param {RegExp} regex Regex to augment.
  2737. * @param {Array} captureNames Array with capture names, or `null`.
  2738. * @param {String} xSource XRegExp pattern used to generate `regex`, or `null` if N/A.
  2739. * @param {String} xFlags XRegExp flags used to generate `regex`, or `null` if N/A.
  2740. * @param {Boolean} [isInternalOnly=false] Whether the regex will be used only for internal
  2741. * operations, and never exposed to users. For internal-only regexes, we can improve perf by
  2742. * skipping some operations like attaching `XRegExp.prototype` properties.
  2743. * @returns {RegExp} Augmented regex.
  2744. */
  2745. function augment(regex, captureNames, xSource, xFlags, isInternalOnly) {
  2746. var p;
  2747. regex[REGEX_DATA] = {
  2748. captureNames: captureNames
  2749. };
  2750. if (isInternalOnly) {
  2751. return regex;
  2752. }
  2753. // Can't auto-inherit these since the XRegExp constructor returns a nonprimitive value
  2754. if (regex.__proto__) {
  2755. regex.__proto__ = XRegExp.prototype;
  2756. } else {
  2757. for (p in XRegExp.prototype) {
  2758. // An `XRegExp.prototype.hasOwnProperty(p)` check wouldn't be worth it here, since this
  2759. // is performance sensitive, and enumerable `Object.prototype` or `RegExp.prototype`
  2760. // extensions exist on `regex.prototype` anyway
  2761. regex[p] = XRegExp.prototype[p];
  2762. }
  2763. }
  2764. regex[REGEX_DATA].source = xSource;
  2765. // Emulate the ES6 `flags` prop by ensuring flags are in alphabetical order
  2766. regex[REGEX_DATA].flags = xFlags ? xFlags.split('').sort().join('') : xFlags;
  2767. return regex;
  2768. }
  2769. /**
  2770. * Removes any duplicate characters from the provided string.
  2771. *
  2772. * @private
  2773. * @param {String} str String to remove duplicate characters from.
  2774. * @returns {String} String with any duplicate characters removed.
  2775. */
  2776. function clipDuplicates(str) {
  2777. return nativ.replace.call(str, /([\s\S])(?=[\s\S]*\1)/g, '');
  2778. }
  2779. /**
  2780. * Copies a regex object while preserving extended data and augmenting with `XRegExp.prototype`
  2781. * properties. The copy has a fresh `lastIndex` property (set to zero). Allows adding and removing
  2782. * flags g and y while copying the regex.
  2783. *
  2784. * @private
  2785. * @param {RegExp} regex Regex to copy.
  2786. * @param {Object} [options] Options object with optional properties:
  2787. * - `addG` {Boolean} Add flag g while copying the regex.
  2788. * - `addY` {Boolean} Add flag y while copying the regex.
  2789. * - `removeG` {Boolean} Remove flag g while copying the regex.
  2790. * - `removeY` {Boolean} Remove flag y while copying the regex.
  2791. * - `isInternalOnly` {Boolean} Whether the copied regex will be used only for internal
  2792. * operations, and never exposed to users. For internal-only regexes, we can improve perf by
  2793. * skipping some operations like attaching `XRegExp.prototype` properties.
  2794. * - `source` {String} Overrides `<regex>.source`, for special cases.
  2795. * @returns {RegExp} Copy of the provided regex, possibly with modified flags.
  2796. */
  2797. function copyRegex(regex, options) {
  2798. if (!XRegExp.isRegExp(regex)) {
  2799. throw new TypeError('Type RegExp expected');
  2800. }
  2801. var xData = regex[REGEX_DATA] || {};
  2802. var flags = getNativeFlags(regex);
  2803. var flagsToAdd = '';
  2804. var flagsToRemove = '';
  2805. var xregexpSource = null;
  2806. var xregexpFlags = null;
  2807. options = options || {};
  2808. if (options.removeG) {flagsToRemove += 'g';}
  2809. if (options.removeY) {flagsToRemove += 'y';}
  2810. if (flagsToRemove) {
  2811. flags = nativ.replace.call(flags, new RegExp('[' + flagsToRemove + ']+', 'g'), '');
  2812. }
  2813. if (options.addG) {flagsToAdd += 'g';}
  2814. if (options.addY) {flagsToAdd += 'y';}
  2815. if (flagsToAdd) {
  2816. flags = clipDuplicates(flags + flagsToAdd);
  2817. }
  2818. if (!options.isInternalOnly) {
  2819. if (xData.source !== undefined) {
  2820. xregexpSource = xData.source;
  2821. }
  2822. // null or undefined; don't want to add to `flags` if the previous value was null, since
  2823. // that indicates we're not tracking original precompilation flags
  2824. if (xData.flags != null) {
  2825. // Flags are only added for non-internal regexes by `XRegExp.globalize`. Flags are never
  2826. // removed for non-internal regexes, so don't need to handle it
  2827. xregexpFlags = flagsToAdd ? clipDuplicates(xData.flags + flagsToAdd) : xData.flags;
  2828. }
  2829. }
  2830. // Augment with `XRegExp.prototype` properties, but use the native `RegExp` constructor to avoid
  2831. // searching for special tokens. That would be wrong for regexes constructed by `RegExp`, and
  2832. // unnecessary for regexes constructed by `XRegExp` because the regex has already undergone the
  2833. // translation to native regex syntax
  2834. regex = augment(
  2835. new RegExp(options.source || regex.source, flags),
  2836. hasNamedCapture(regex) ? xData.captureNames.slice(0) : null,
  2837. xregexpSource,
  2838. xregexpFlags,
  2839. options.isInternalOnly
  2840. );
  2841. return regex;
  2842. }
  2843. /**
  2844. * Converts hexadecimal to decimal.
  2845. *
  2846. * @private
  2847. * @param {String} hex
  2848. * @returns {Number}
  2849. */
  2850. function dec(hex) {
  2851. return parseInt(hex, 16);
  2852. }
  2853. /**
  2854. * Returns a pattern that can be used in a native RegExp in place of an ignorable token such as an
  2855. * inline comment or whitespace with flag x. This is used directly as a token handler function
  2856. * passed to `XRegExp.addToken`.
  2857. *
  2858. * @private
  2859. * @param {String} match Match arg of `XRegExp.addToken` handler
  2860. * @param {String} scope Scope arg of `XRegExp.addToken` handler
  2861. * @param {String} flags Flags arg of `XRegExp.addToken` handler
  2862. * @returns {String} Either '' or '(?:)', depending on which is needed in the context of the match.
  2863. */
  2864. function getContextualTokenSeparator(match, scope, flags) {
  2865. if (
  2866. // No need to separate tokens if at the beginning or end of a group
  2867. match.input.charAt(match.index - 1) === '(' ||
  2868. match.input.charAt(match.index + match[0].length) === ')' ||
  2869. // Avoid separating tokens when the following token is a quantifier
  2870. isPatternNext(match.input, match.index + match[0].length, flags, '[?*+]|{\\d+(?:,\\d*)?}')
  2871. ) {
  2872. return '';
  2873. }
  2874. // Keep tokens separated. This avoids e.g. inadvertedly changing `\1 1` or `\1(?#)1` to `\11`.
  2875. // This also ensures all tokens remain as discrete atoms, e.g. it avoids converting the syntax
  2876. // error `(? :` into `(?:`.
  2877. return '(?:)';
  2878. }
  2879. /**
  2880. * Returns native `RegExp` flags used by a regex object.
  2881. *
  2882. * @private
  2883. * @param {RegExp} regex Regex to check.
  2884. * @returns {String} Native flags in use.
  2885. */
  2886. function getNativeFlags(regex) {
  2887. return hasFlagsProp ?
  2888. regex.flags :
  2889. // Explicitly using `RegExp.prototype.toString` (rather than e.g. `String` or concatenation
  2890. // with an empty string) allows this to continue working predictably when
  2891. // `XRegExp.proptotype.toString` is overridden
  2892. nativ.exec.call(/\/([a-z]*)$/i, RegExp.prototype.toString.call(regex))[1];
  2893. }
  2894. /**
  2895. * Determines whether a regex has extended instance data used to track capture names.
  2896. *
  2897. * @private
  2898. * @param {RegExp} regex Regex to check.
  2899. * @returns {Boolean} Whether the regex uses named capture.
  2900. */
  2901. function hasNamedCapture(regex) {
  2902. return !!(regex[REGEX_DATA] && regex[REGEX_DATA].captureNames);
  2903. }
  2904. /**
  2905. * Converts decimal to hexadecimal.
  2906. *
  2907. * @private
  2908. * @param {Number|String} dec
  2909. * @returns {String}
  2910. */
  2911. function hex(dec) {
  2912. return parseInt(dec, 10).toString(16);
  2913. }
  2914. /**
  2915. * Returns the first index at which a given value can be found in an array.
  2916. *
  2917. * @private
  2918. * @param {Array} array Array to search.
  2919. * @param {*} value Value to locate in the array.
  2920. * @returns {Number} Zero-based index at which the item is found, or -1.
  2921. */
  2922. function indexOf(array, value) {
  2923. var len = array.length;
  2924. var i;
  2925. for (i = 0; i < len; ++i) {
  2926. if (array[i] === value) {
  2927. return i;
  2928. }
  2929. }
  2930. return -1;
  2931. }
  2932. /**
  2933. * Checks whether the next nonignorable token after the specified position matches the
  2934. * `needlePattern`
  2935. *
  2936. * @private
  2937. * @param {String} pattern Pattern to search within.
  2938. * @param {Number} pos Index in `pattern` to search at.
  2939. * @param {String} flags Flags used by the pattern.
  2940. * @param {String} needlePattern Pattern to match the next token against.
  2941. * @returns {Boolean} Whether the next nonignorable token matches `needlePattern`
  2942. */
  2943. function isPatternNext(pattern, pos, flags, needlePattern) {
  2944. var inlineCommentPattern = '\\(\\?#[^)]*\\)';
  2945. var lineCommentPattern = '#[^#\\n]*';
  2946. var patternsToIgnore = flags.indexOf('x') > -1 ?
  2947. // Ignore any leading whitespace, line comments, and inline comments
  2948. ['\\s', lineCommentPattern, inlineCommentPattern] :
  2949. // Ignore any leading inline comments
  2950. [inlineCommentPattern];
  2951. return nativ.test.call(
  2952. new RegExp('^(?:' + patternsToIgnore.join('|') + ')*(?:' + needlePattern + ')'),
  2953. pattern.slice(pos)
  2954. );
  2955. }
  2956. /**
  2957. * Determines whether a value is of the specified type, by resolving its internal [[Class]].
  2958. *
  2959. * @private
  2960. * @param {*} value Object to check.
  2961. * @param {String} type Type to check for, in TitleCase.
  2962. * @returns {Boolean} Whether the object matches the type.
  2963. */
  2964. function isType(value, type) {
  2965. return toString.call(value) === '[object ' + type + ']';
  2966. }
  2967. /**
  2968. * Adds leading zeros if shorter than four characters. Used for fixed-length hexadecimal values.
  2969. *
  2970. * @private
  2971. * @param {String} str
  2972. * @returns {String}
  2973. */
  2974. function pad4(str) {
  2975. while (str.length < 4) {
  2976. str = '0' + str;
  2977. }
  2978. return str;
  2979. }
  2980. /**
  2981. * Checks for flag-related errors, and strips/applies flags in a leading mode modifier. Offloads
  2982. * the flag preparation logic from the `XRegExp` constructor.
  2983. *
  2984. * @private
  2985. * @param {String} pattern Regex pattern, possibly with a leading mode modifier.
  2986. * @param {String} flags Any combination of flags.
  2987. * @returns {Object} Object with properties `pattern` and `flags`.
  2988. */
  2989. function prepareFlags(pattern, flags) {
  2990. var i;
  2991. // Recent browsers throw on duplicate flags, so copy this behavior for nonnative flags
  2992. if (clipDuplicates(flags) !== flags) {
  2993. throw new SyntaxError('Invalid duplicate regex flag ' + flags);
  2994. }
  2995. // Strip and apply a leading mode modifier with any combination of flags except g or y
  2996. pattern = nativ.replace.call(pattern, /^\(\?([\w$]+)\)/, function($0, $1) {
  2997. if (nativ.test.call(/[gy]/, $1)) {
  2998. throw new SyntaxError('Cannot use flag g or y in mode modifier ' + $0);
  2999. }
  3000. // Allow duplicate flags within the mode modifier
  3001. flags = clipDuplicates(flags + $1);
  3002. return '';
  3003. });
  3004. // Throw on unknown native or nonnative flags
  3005. for (i = 0; i < flags.length; ++i) {
  3006. if (!registeredFlags[flags.charAt(i)]) {
  3007. throw new SyntaxError('Unknown regex flag ' + flags.charAt(i));
  3008. }
  3009. }
  3010. return {
  3011. pattern: pattern,
  3012. flags: flags
  3013. };
  3014. }
  3015. /**
  3016. * Prepares an options object from the given value.
  3017. *
  3018. * @private
  3019. * @param {String|Object} value Value to convert to an options object.
  3020. * @returns {Object} Options object.
  3021. */
  3022. function prepareOptions(value) {
  3023. var options = {};
  3024. if (isType(value, 'String')) {
  3025. XRegExp.forEach(value, /[^\s,]+/, function(match) {
  3026. options[match] = true;
  3027. });
  3028. return options;
  3029. }
  3030. return value;
  3031. }
  3032. /**
  3033. * Registers a flag so it doesn't throw an 'unknown flag' error.
  3034. *
  3035. * @private
  3036. * @param {String} flag Single-character flag to register.
  3037. */
  3038. function registerFlag(flag) {
  3039. if (!/^[\w$]$/.test(flag)) {
  3040. throw new Error('Flag must be a single character A-Za-z0-9_$');
  3041. }
  3042. registeredFlags[flag] = true;
  3043. }
  3044. /**
  3045. * Runs built-in and custom regex syntax tokens in reverse insertion order at the specified
  3046. * position, until a match is found.
  3047. *
  3048. * @private
  3049. * @param {String} pattern Original pattern from which an XRegExp object is being built.
  3050. * @param {String} flags Flags being used to construct the regex.
  3051. * @param {Number} pos Position to search for tokens within `pattern`.
  3052. * @param {Number} scope Regex scope to apply: 'default' or 'class'.
  3053. * @param {Object} context Context object to use for token handler functions.
  3054. * @returns {Object} Object with properties `matchLength`, `output`, and `reparse`; or `null`.
  3055. */
  3056. function runTokens(pattern, flags, pos, scope, context) {
  3057. var i = tokens.length;
  3058. var leadChar = pattern.charAt(pos);
  3059. var result = null;
  3060. var match;
  3061. var t;
  3062. // Run in reverse insertion order
  3063. while (i--) {
  3064. t = tokens[i];
  3065. if (
  3066. (t.leadChar && t.leadChar !== leadChar) ||
  3067. (t.scope !== scope && t.scope !== 'all') ||
  3068. (t.flag && flags.indexOf(t.flag) === -1)
  3069. ) {
  3070. continue;
  3071. }
  3072. match = XRegExp.exec(pattern, t.regex, pos, 'sticky');
  3073. if (match) {
  3074. result = {
  3075. matchLength: match[0].length,
  3076. output: t.handler.call(context, match, scope, flags),
  3077. reparse: t.reparse
  3078. };
  3079. // Finished with token tests
  3080. break;
  3081. }
  3082. }
  3083. return result;
  3084. }
  3085. /**
  3086. * Enables or disables implicit astral mode opt-in. When enabled, flag A is automatically added to
  3087. * all new regexes created by XRegExp. This causes an error to be thrown when creating regexes if
  3088. * the Unicode Base addon is not available, since flag A is registered by that addon.
  3089. *
  3090. * @private
  3091. * @param {Boolean} on `true` to enable; `false` to disable.
  3092. */
  3093. function setAstral(on) {
  3094. features.astral = on;
  3095. }
  3096. /**
  3097. * Enables or disables native method overrides.
  3098. *
  3099. * @private
  3100. * @param {Boolean} on `true` to enable; `false` to disable.
  3101. */
  3102. function setNatives(on) {
  3103. RegExp.prototype.exec = (on ? fixed : nativ).exec;
  3104. RegExp.prototype.test = (on ? fixed : nativ).test;
  3105. String.prototype.match = (on ? fixed : nativ).match;
  3106. String.prototype.replace = (on ? fixed : nativ).replace;
  3107. String.prototype.split = (on ? fixed : nativ).split;
  3108. features.natives = on;
  3109. }
  3110. /**
  3111. * Returns the object, or throws an error if it is `null` or `undefined`. This is used to follow
  3112. * the ES5 abstract operation `ToObject`.
  3113. *
  3114. * @private
  3115. * @param {*} value Object to check and return.
  3116. * @returns {*} The provided object.
  3117. */
  3118. function toObject(value) {
  3119. // null or undefined
  3120. if (value == null) {
  3121. throw new TypeError('Cannot convert null or undefined to object');
  3122. }
  3123. return value;
  3124. }
  3125. // ==--------------------------==
  3126. // Constructor
  3127. // ==--------------------------==
  3128. /**
  3129. * Creates an extended regular expression object for matching text with a pattern. Differs from a
  3130. * native regular expression in that additional syntax and flags are supported. The returned object
  3131. * is in fact a native `RegExp` and works with all native methods.
  3132. *
  3133. * @class XRegExp
  3134. * @constructor
  3135. * @param {String|RegExp} pattern Regex pattern string, or an existing regex object to copy.
  3136. * @param {String} [flags] Any combination of flags.
  3137. * Native flags:
  3138. * - `g` - global
  3139. * - `i` - ignore case
  3140. * - `m` - multiline anchors
  3141. * - `u` - unicode (ES6)
  3142. * - `y` - sticky (Firefox 3+, ES6)
  3143. * Additional XRegExp flags:
  3144. * - `n` - explicit capture
  3145. * - `s` - dot matches all (aka singleline)
  3146. * - `x` - free-spacing and line comments (aka extended)
  3147. * - `A` - astral (requires the Unicode Base addon)
  3148. * Flags cannot be provided when constructing one `RegExp` from another.
  3149. * @returns {RegExp} Extended regular expression object.
  3150. * @example
  3151. *
  3152. * // With named capture and flag x
  3153. * XRegExp('(?<year> [0-9]{4} ) -? # year \n\
  3154. * (?<month> [0-9]{2} ) -? # month \n\
  3155. * (?<day> [0-9]{2} ) # day ', 'x');
  3156. *
  3157. * // Providing a regex object copies it. Native regexes are recompiled using native (not XRegExp)
  3158. * // syntax. Copies maintain extended data, are augmented with `XRegExp.prototype` properties, and
  3159. * // have fresh `lastIndex` properties (set to zero).
  3160. * XRegExp(/regex/);
  3161. */
  3162. function XRegExp(pattern, flags) {
  3163. if (XRegExp.isRegExp(pattern)) {
  3164. if (flags !== undefined) {
  3165. throw new TypeError('Cannot supply flags when copying a RegExp');
  3166. }
  3167. return copyRegex(pattern);
  3168. }
  3169. // Copy the argument behavior of `RegExp`
  3170. pattern = pattern === undefined ? '' : String(pattern);
  3171. flags = flags === undefined ? '' : String(flags);
  3172. if (XRegExp.isInstalled('astral') && flags.indexOf('A') === -1) {
  3173. // This causes an error to be thrown if the Unicode Base addon is not available
  3174. flags += 'A';
  3175. }
  3176. if (!patternCache[pattern]) {
  3177. patternCache[pattern] = {};
  3178. }
  3179. if (!patternCache[pattern][flags]) {
  3180. var context = {
  3181. hasNamedCapture: false,
  3182. captureNames: []
  3183. };
  3184. var scope = defaultScope;
  3185. var output = '';
  3186. var pos = 0;
  3187. var result;
  3188. // Check for flag-related errors, and strip/apply flags in a leading mode modifier
  3189. var applied = prepareFlags(pattern, flags);
  3190. var appliedPattern = applied.pattern;
  3191. var appliedFlags = applied.flags;
  3192. // Use XRegExp's tokens to translate the pattern to a native regex pattern.
  3193. // `appliedPattern.length` may change on each iteration if tokens use `reparse`
  3194. while (pos < appliedPattern.length) {
  3195. do {
  3196. // Check for custom tokens at the current position
  3197. result = runTokens(appliedPattern, appliedFlags, pos, scope, context);
  3198. // If the matched token used the `reparse` option, splice its output into the
  3199. // pattern before running tokens again at the same position
  3200. if (result && result.reparse) {
  3201. appliedPattern = appliedPattern.slice(0, pos) +
  3202. result.output +
  3203. appliedPattern.slice(pos + result.matchLength);
  3204. }
  3205. } while (result && result.reparse);
  3206. if (result) {
  3207. output += result.output;
  3208. pos += (result.matchLength || 1);
  3209. } else {
  3210. // Get the native token at the current position
  3211. var token = XRegExp.exec(appliedPattern, nativeTokens[scope], pos, 'sticky')[0];
  3212. output += token;
  3213. pos += token.length;
  3214. if (token === '[' && scope === defaultScope) {
  3215. scope = classScope;
  3216. } else if (token === ']' && scope === classScope) {
  3217. scope = defaultScope;
  3218. }
  3219. }
  3220. }
  3221. patternCache[pattern][flags] = {
  3222. // Use basic cleanup to collapse repeated empty groups like `(?:)(?:)` to `(?:)`. Empty
  3223. // groups are sometimes inserted during regex transpilation in order to keep tokens
  3224. // separated. However, more than one empty group in a row is never needed.
  3225. pattern: nativ.replace.call(output, /(?:\(\?:\))+/g, '(?:)'),
  3226. // Strip all but native flags
  3227. flags: nativ.replace.call(appliedFlags, /[^gimuy]+/g, ''),
  3228. // `context.captureNames` has an item for each capturing group, even if unnamed
  3229. captures: context.hasNamedCapture ? context.captureNames : null
  3230. };
  3231. }
  3232. var generated = patternCache[pattern][flags];
  3233. return augment(
  3234. new RegExp(generated.pattern, generated.flags),
  3235. generated.captures,
  3236. pattern,
  3237. flags
  3238. );
  3239. }
  3240. // Add `RegExp.prototype` to the prototype chain
  3241. XRegExp.prototype = new RegExp();
  3242. // ==--------------------------==
  3243. // Public properties
  3244. // ==--------------------------==
  3245. /**
  3246. * The XRegExp version number as a string containing three dot-separated parts. For example,
  3247. * '2.0.0-beta-3'.
  3248. *
  3249. * @static
  3250. * @memberOf XRegExp
  3251. * @type String
  3252. */
  3253. XRegExp.version = '3.2.0';
  3254. // ==--------------------------==
  3255. // Public methods
  3256. // ==--------------------------==
  3257. // Intentionally undocumented; used in tests and addons
  3258. XRegExp._clipDuplicates = clipDuplicates;
  3259. XRegExp._hasNativeFlag = hasNativeFlag;
  3260. XRegExp._dec = dec;
  3261. XRegExp._hex = hex;
  3262. XRegExp._pad4 = pad4;
  3263. /**
  3264. * Extends XRegExp syntax and allows custom flags. This is used internally and can be used to
  3265. * create XRegExp addons. If more than one token can match the same string, the last added wins.
  3266. *
  3267. * @memberOf XRegExp
  3268. * @param {RegExp} regex Regex object that matches the new token.
  3269. * @param {Function} handler Function that returns a new pattern string (using native regex syntax)
  3270. * to replace the matched token within all future XRegExp regexes. Has access to persistent
  3271. * properties of the regex being built, through `this`. Invoked with three arguments:
  3272. * - The match array, with named backreference properties.
  3273. * - The regex scope where the match was found: 'default' or 'class'.
  3274. * - The flags used by the regex, including any flags in a leading mode modifier.
  3275. * The handler function becomes part of the XRegExp construction process, so be careful not to
  3276. * construct XRegExps within the function or you will trigger infinite recursion.
  3277. * @param {Object} [options] Options object with optional properties:
  3278. * - `scope` {String} Scope where the token applies: 'default', 'class', or 'all'.
  3279. * - `flag` {String} Single-character flag that triggers the token. This also registers the
  3280. * flag, which prevents XRegExp from throwing an 'unknown flag' error when the flag is used.
  3281. * - `optionalFlags` {String} Any custom flags checked for within the token `handler` that are
  3282. * not required to trigger the token. This registers the flags, to prevent XRegExp from
  3283. * throwing an 'unknown flag' error when any of the flags are used.
  3284. * - `reparse` {Boolean} Whether the `handler` function's output should not be treated as
  3285. * final, and instead be reparseable by other tokens (including the current token). Allows
  3286. * token chaining or deferring.
  3287. * - `leadChar` {String} Single character that occurs at the beginning of any successful match
  3288. * of the token (not always applicable). This doesn't change the behavior of the token unless
  3289. * you provide an erroneous value. However, providing it can increase the token's performance
  3290. * since the token can be skipped at any positions where this character doesn't appear.
  3291. * @example
  3292. *
  3293. * // Basic usage: Add \a for the ALERT control code
  3294. * XRegExp.addToken(
  3295. * /\\a/,
  3296. * function() {return '\\x07';},
  3297. * {scope: 'all'}
  3298. * );
  3299. * XRegExp('\\a[\\a-\\n]+').test('\x07\n\x07'); // -> true
  3300. *
  3301. * // Add the U (ungreedy) flag from PCRE and RE2, which reverses greedy and lazy quantifiers.
  3302. * // Since `scope` is not specified, it uses 'default' (i.e., transformations apply outside of
  3303. * // character classes only)
  3304. * XRegExp.addToken(
  3305. * /([?*+]|{\d+(?:,\d*)?})(\??)/,
  3306. * function(match) {return match[1] + (match[2] ? '' : '?');},
  3307. * {flag: 'U'}
  3308. * );
  3309. * XRegExp('a+', 'U').exec('aaa')[0]; // -> 'a'
  3310. * XRegExp('a+?', 'U').exec('aaa')[0]; // -> 'aaa'
  3311. */
  3312. XRegExp.addToken = function(regex, handler, options) {
  3313. options = options || {};
  3314. var optionalFlags = options.optionalFlags;
  3315. var i;
  3316. if (options.flag) {
  3317. registerFlag(options.flag);
  3318. }
  3319. if (optionalFlags) {
  3320. optionalFlags = nativ.split.call(optionalFlags, '');
  3321. for (i = 0; i < optionalFlags.length; ++i) {
  3322. registerFlag(optionalFlags[i]);
  3323. }
  3324. }
  3325. // Add to the private list of syntax tokens
  3326. tokens.push({
  3327. regex: copyRegex(regex, {
  3328. addG: true,
  3329. addY: hasNativeY,
  3330. isInternalOnly: true
  3331. }),
  3332. handler: handler,
  3333. scope: options.scope || defaultScope,
  3334. flag: options.flag,
  3335. reparse: options.reparse,
  3336. leadChar: options.leadChar
  3337. });
  3338. // Reset the pattern cache used by the `XRegExp` constructor, since the same pattern and flags
  3339. // might now produce different results
  3340. XRegExp.cache.flush('patterns');
  3341. };
  3342. /**
  3343. * Caches and returns the result of calling `XRegExp(pattern, flags)`. On any subsequent call with
  3344. * the same pattern and flag combination, the cached copy of the regex is returned.
  3345. *
  3346. * @memberOf XRegExp
  3347. * @param {String} pattern Regex pattern string.
  3348. * @param {String} [flags] Any combination of XRegExp flags.
  3349. * @returns {RegExp} Cached XRegExp object.
  3350. * @example
  3351. *
  3352. * while (match = XRegExp.cache('.', 'gs').exec(str)) {
  3353. * // The regex is compiled once only
  3354. * }
  3355. */
  3356. XRegExp.cache = function(pattern, flags) {
  3357. if (!regexCache[pattern]) {
  3358. regexCache[pattern] = {};
  3359. }
  3360. return regexCache[pattern][flags] || (
  3361. regexCache[pattern][flags] = XRegExp(pattern, flags)
  3362. );
  3363. };
  3364. // Intentionally undocumented; used in tests
  3365. XRegExp.cache.flush = function(cacheName) {
  3366. if (cacheName === 'patterns') {
  3367. // Flush the pattern cache used by the `XRegExp` constructor
  3368. patternCache = {};
  3369. } else {
  3370. // Flush the regex cache populated by `XRegExp.cache`
  3371. regexCache = {};
  3372. }
  3373. };
  3374. /**
  3375. * Escapes any regular expression metacharacters, for use when matching literal strings. The result
  3376. * can safely be used at any point within a regex that uses any flags.
  3377. *
  3378. * @memberOf XRegExp
  3379. * @param {String} str String to escape.
  3380. * @returns {String} String with regex metacharacters escaped.
  3381. * @example
  3382. *
  3383. * XRegExp.escape('Escaped? <.>');
  3384. * // -> 'Escaped\?\ <\.>'
  3385. */
  3386. XRegExp.escape = function(str) {
  3387. return nativ.replace.call(toObject(str), /[-\[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
  3388. };
  3389. /**
  3390. * Executes a regex search in a specified string. Returns a match array or `null`. If the provided
  3391. * regex uses named capture, named backreference properties are included on the match array.
  3392. * Optional `pos` and `sticky` arguments specify the search start position, and whether the match
  3393. * must start at the specified position only. The `lastIndex` property of the provided regex is not
  3394. * used, but is updated for compatibility. Also fixes browser bugs compared to the native
  3395. * `RegExp.prototype.exec` and can be used reliably cross-browser.
  3396. *
  3397. * @memberOf XRegExp
  3398. * @param {String} str String to search.
  3399. * @param {RegExp} regex Regex to search with.
  3400. * @param {Number} [pos=0] Zero-based index at which to start the search.
  3401. * @param {Boolean|String} [sticky=false] Whether the match must start at the specified position
  3402. * only. The string `'sticky'` is accepted as an alternative to `true`.
  3403. * @returns {Array} Match array with named backreference properties, or `null`.
  3404. * @example
  3405. *
  3406. * // Basic use, with named backreference
  3407. * var match = XRegExp.exec('U+2620', XRegExp('U\\+(?<hex>[0-9A-F]{4})'));
  3408. * match.hex; // -> '2620'
  3409. *
  3410. * // With pos and sticky, in a loop
  3411. * var pos = 2, result = [], match;
  3412. * while (match = XRegExp.exec('<1><2><3><4>5<6>', /<(\d)>/, pos, 'sticky')) {
  3413. * result.push(match[1]);
  3414. * pos = match.index + match[0].length;
  3415. * }
  3416. * // result -> ['2', '3', '4']
  3417. */
  3418. XRegExp.exec = function(str, regex, pos, sticky) {
  3419. var cacheKey = 'g';
  3420. var addY = false;
  3421. var fakeY = false;
  3422. var match;
  3423. var r2;
  3424. addY = hasNativeY && !!(sticky || (regex.sticky && sticky !== false));
  3425. if (addY) {
  3426. cacheKey += 'y';
  3427. } else if (sticky) {
  3428. // Simulate sticky matching by appending an empty capture to the original regex. The
  3429. // resulting regex will succeed no matter what at the current index (set with `lastIndex`),
  3430. // and will not search the rest of the subject string. We'll know that the original regex
  3431. // has failed if that last capture is `''` rather than `undefined` (i.e., if that last
  3432. // capture participated in the match).
  3433. fakeY = true;
  3434. cacheKey += 'FakeY';
  3435. }
  3436. regex[REGEX_DATA] = regex[REGEX_DATA] || {};
  3437. // Shares cached copies with `XRegExp.match`/`replace`
  3438. r2 = regex[REGEX_DATA][cacheKey] || (
  3439. regex[REGEX_DATA][cacheKey] = copyRegex(regex, {
  3440. addG: true,
  3441. addY: addY,
  3442. source: fakeY ? regex.source + '|()' : undefined,
  3443. removeY: sticky === false,
  3444. isInternalOnly: true
  3445. })
  3446. );
  3447. pos = pos || 0;
  3448. r2.lastIndex = pos;
  3449. // Fixed `exec` required for `lastIndex` fix, named backreferences, etc.
  3450. match = fixed.exec.call(r2, str);
  3451. // Get rid of the capture added by the pseudo-sticky matcher if needed. An empty string means
  3452. // the original regexp failed (see above).
  3453. if (fakeY && match && match.pop() === '') {
  3454. match = null;
  3455. }
  3456. if (regex.global) {
  3457. regex.lastIndex = match ? r2.lastIndex : 0;
  3458. }
  3459. return match;
  3460. };
  3461. /**
  3462. * Executes a provided function once per regex match. Searches always start at the beginning of the
  3463. * string and continue until the end, regardless of the state of the regex's `global` property and
  3464. * initial `lastIndex`.
  3465. *
  3466. * @memberOf XRegExp
  3467. * @param {String} str String to search.
  3468. * @param {RegExp} regex Regex to search with.
  3469. * @param {Function} callback Function to execute for each match. Invoked with four arguments:
  3470. * - The match array, with named backreference properties.
  3471. * - The zero-based match index.
  3472. * - The string being traversed.
  3473. * - The regex object being used to traverse the string.
  3474. * @example
  3475. *
  3476. * // Extracts every other digit from a string
  3477. * var evens = [];
  3478. * XRegExp.forEach('1a2345', /\d/, function(match, i) {
  3479. * if (i % 2) evens.push(+match[0]);
  3480. * });
  3481. * // evens -> [2, 4]
  3482. */
  3483. XRegExp.forEach = function(str, regex, callback) {
  3484. var pos = 0;
  3485. var i = -1;
  3486. var match;
  3487. while ((match = XRegExp.exec(str, regex, pos))) {
  3488. // Because `regex` is provided to `callback`, the function could use the deprecated/
  3489. // nonstandard `RegExp.prototype.compile` to mutate the regex. However, since `XRegExp.exec`
  3490. // doesn't use `lastIndex` to set the search position, this can't lead to an infinite loop,
  3491. // at least. Actually, because of the way `XRegExp.exec` caches globalized versions of
  3492. // regexes, mutating the regex will not have any effect on the iteration or matched strings,
  3493. // which is a nice side effect that brings extra safety.
  3494. callback(match, ++i, str, regex);
  3495. pos = match.index + (match[0].length || 1);
  3496. }
  3497. };
  3498. /**
  3499. * Copies a regex object and adds flag `g`. The copy maintains extended data, is augmented with
  3500. * `XRegExp.prototype` properties, and has a fresh `lastIndex` property (set to zero). Native
  3501. * regexes are not recompiled using XRegExp syntax.
  3502. *
  3503. * @memberOf XRegExp
  3504. * @param {RegExp} regex Regex to globalize.
  3505. * @returns {RegExp} Copy of the provided regex with flag `g` added.
  3506. * @example
  3507. *
  3508. * var globalCopy = XRegExp.globalize(/regex/);
  3509. * globalCopy.global; // -> true
  3510. */
  3511. XRegExp.globalize = function(regex) {
  3512. return copyRegex(regex, {addG: true});
  3513. };
  3514. /**
  3515. * Installs optional features according to the specified options. Can be undone using
  3516. * `XRegExp.uninstall`.
  3517. *
  3518. * @memberOf XRegExp
  3519. * @param {Object|String} options Options object or string.
  3520. * @example
  3521. *
  3522. * // With an options object
  3523. * XRegExp.install({
  3524. * // Enables support for astral code points in Unicode addons (implicitly sets flag A)
  3525. * astral: true,
  3526. *
  3527. * // DEPRECATED: Overrides native regex methods with fixed/extended versions
  3528. * natives: true
  3529. * });
  3530. *
  3531. * // With an options string
  3532. * XRegExp.install('astral natives');
  3533. */
  3534. XRegExp.install = function(options) {
  3535. options = prepareOptions(options);
  3536. if (!features.astral && options.astral) {
  3537. setAstral(true);
  3538. }
  3539. if (!features.natives && options.natives) {
  3540. setNatives(true);
  3541. }
  3542. };
  3543. /**
  3544. * Checks whether an individual optional feature is installed.
  3545. *
  3546. * @memberOf XRegExp
  3547. * @param {String} feature Name of the feature to check. One of:
  3548. * - `astral`
  3549. * - `natives`
  3550. * @returns {Boolean} Whether the feature is installed.
  3551. * @example
  3552. *
  3553. * XRegExp.isInstalled('astral');
  3554. */
  3555. XRegExp.isInstalled = function(feature) {
  3556. return !!(features[feature]);
  3557. };
  3558. /**
  3559. * Returns `true` if an object is a regex; `false` if it isn't. This works correctly for regexes
  3560. * created in another frame, when `instanceof` and `constructor` checks would fail.
  3561. *
  3562. * @memberOf XRegExp
  3563. * @param {*} value Object to check.
  3564. * @returns {Boolean} Whether the object is a `RegExp` object.
  3565. * @example
  3566. *
  3567. * XRegExp.isRegExp('string'); // -> false
  3568. * XRegExp.isRegExp(/regex/i); // -> true
  3569. * XRegExp.isRegExp(RegExp('^', 'm')); // -> true
  3570. * XRegExp.isRegExp(XRegExp('(?s).')); // -> true
  3571. */
  3572. XRegExp.isRegExp = function(value) {
  3573. return toString.call(value) === '[object RegExp]';
  3574. //return isType(value, 'RegExp');
  3575. };
  3576. /**
  3577. * Returns the first matched string, or in global mode, an array containing all matched strings.
  3578. * This is essentially a more convenient re-implementation of `String.prototype.match` that gives
  3579. * the result types you actually want (string instead of `exec`-style array in match-first mode,
  3580. * and an empty array instead of `null` when no matches are found in match-all mode). It also lets
  3581. * you override flag g and ignore `lastIndex`, and fixes browser bugs.
  3582. *
  3583. * @memberOf XRegExp
  3584. * @param {String} str String to search.
  3585. * @param {RegExp} regex Regex to search with.
  3586. * @param {String} [scope='one'] Use 'one' to return the first match as a string. Use 'all' to
  3587. * return an array of all matched strings. If not explicitly specified and `regex` uses flag g,
  3588. * `scope` is 'all'.
  3589. * @returns {String|Array} In match-first mode: First match as a string, or `null`. In match-all
  3590. * mode: Array of all matched strings, or an empty array.
  3591. * @example
  3592. *
  3593. * // Match first
  3594. * XRegExp.match('abc', /\w/); // -> 'a'
  3595. * XRegExp.match('abc', /\w/g, 'one'); // -> 'a'
  3596. * XRegExp.match('abc', /x/g, 'one'); // -> null
  3597. *
  3598. * // Match all
  3599. * XRegExp.match('abc', /\w/g); // -> ['a', 'b', 'c']
  3600. * XRegExp.match('abc', /\w/, 'all'); // -> ['a', 'b', 'c']
  3601. * XRegExp.match('abc', /x/, 'all'); // -> []
  3602. */
  3603. XRegExp.match = function(str, regex, scope) {
  3604. var global = (regex.global && scope !== 'one') || scope === 'all';
  3605. var cacheKey = ((global ? 'g' : '') + (regex.sticky ? 'y' : '')) || 'noGY';
  3606. var result;
  3607. var r2;
  3608. regex[REGEX_DATA] = regex[REGEX_DATA] || {};
  3609. // Shares cached copies with `XRegExp.exec`/`replace`
  3610. r2 = regex[REGEX_DATA][cacheKey] || (
  3611. regex[REGEX_DATA][cacheKey] = copyRegex(regex, {
  3612. addG: !!global,
  3613. removeG: scope === 'one',
  3614. isInternalOnly: true
  3615. })
  3616. );
  3617. result = nativ.match.call(toObject(str), r2);
  3618. if (regex.global) {
  3619. regex.lastIndex = (
  3620. (scope === 'one' && result) ?
  3621. // Can't use `r2.lastIndex` since `r2` is nonglobal in this case
  3622. (result.index + result[0].length) : 0
  3623. );
  3624. }
  3625. return global ? (result || []) : (result && result[0]);
  3626. };
  3627. /**
  3628. * Retrieves the matches from searching a string using a chain of regexes that successively search
  3629. * within previous matches. The provided `chain` array can contain regexes and or objects with
  3630. * `regex` and `backref` properties. When a backreference is specified, the named or numbered
  3631. * backreference is passed forward to the next regex or returned.
  3632. *
  3633. * @memberOf XRegExp
  3634. * @param {String} str String to search.
  3635. * @param {Array} chain Regexes that each search for matches within preceding results.
  3636. * @returns {Array} Matches by the last regex in the chain, or an empty array.
  3637. * @example
  3638. *
  3639. * // Basic usage; matches numbers within <b> tags
  3640. * XRegExp.matchChain('1 <b>2</b> 3 <b>4 a 56</b>', [
  3641. * XRegExp('(?is)<b>.*?</b>'),
  3642. * /\d+/
  3643. * ]);
  3644. * // -> ['2', '4', '56']
  3645. *
  3646. * // Passing forward and returning specific backreferences
  3647. * html = '<a href="http://xregexp.com/api/">XRegExp</a>\
  3648. * <a href="http://www.google.com/">Google</a>';
  3649. * XRegExp.matchChain(html, [
  3650. * {regex: /<a href="([^"]+)">/i, backref: 1},
  3651. * {regex: XRegExp('(?i)^https?://(?<domain>[^/?#]+)'), backref: 'domain'}
  3652. * ]);
  3653. * // -> ['xregexp.com', 'www.google.com']
  3654. */
  3655. XRegExp.matchChain = function(str, chain) {
  3656. return (function recurseChain(values, level) {
  3657. var item = chain[level].regex ? chain[level] : {regex: chain[level]};
  3658. var matches = [];
  3659. function addMatch(match) {
  3660. if (item.backref) {
  3661. // Safari 4.0.5 (but not 5.0.5+) inappropriately uses sparse arrays to hold the
  3662. // `undefined`s for backreferences to nonparticipating capturing groups. In such
  3663. // cases, a `hasOwnProperty` or `in` check on its own would inappropriately throw
  3664. // the exception, so also check if the backreference is a number that is within the
  3665. // bounds of the array.
  3666. if (!(match.hasOwnProperty(item.backref) || +item.backref < match.length)) {
  3667. throw new ReferenceError('Backreference to undefined group: ' + item.backref);
  3668. }
  3669. matches.push(match[item.backref] || '');
  3670. } else {
  3671. matches.push(match[0]);
  3672. }
  3673. }
  3674. for (var i = 0; i < values.length; ++i) {
  3675. XRegExp.forEach(values[i], item.regex, addMatch);
  3676. }
  3677. return ((level === chain.length - 1) || !matches.length) ?
  3678. matches :
  3679. recurseChain(matches, level + 1);
  3680. }([str], 0));
  3681. };
  3682. /**
  3683. * Returns a new string with one or all matches of a pattern replaced. The pattern can be a string
  3684. * or regex, and the replacement can be a string or a function to be called for each match. To
  3685. * perform a global search and replace, use the optional `scope` argument or include flag g if using
  3686. * a regex. Replacement strings can use `${n}` for named and numbered backreferences. Replacement
  3687. * functions can use named backreferences via `arguments[0].name`. Also fixes browser bugs compared
  3688. * to the native `String.prototype.replace` and can be used reliably cross-browser.
  3689. *
  3690. * @memberOf XRegExp
  3691. * @param {String} str String to search.
  3692. * @param {RegExp|String} search Search pattern to be replaced.
  3693. * @param {String|Function} replacement Replacement string or a function invoked to create it.
  3694. * Replacement strings can include special replacement syntax:
  3695. * - $$ - Inserts a literal $ character.
  3696. * - $&, $0 - Inserts the matched substring.
  3697. * - $` - Inserts the string that precedes the matched substring (left context).
  3698. * - $' - Inserts the string that follows the matched substring (right context).
  3699. * - $n, $nn - Where n/nn are digits referencing an existent capturing group, inserts
  3700. * backreference n/nn.
  3701. * - ${n} - Where n is a name or any number of digits that reference an existent capturing
  3702. * group, inserts backreference n.
  3703. * Replacement functions are invoked with three or more arguments:
  3704. * - The matched substring (corresponds to $& above). Named backreferences are accessible as
  3705. * properties of this first argument.
  3706. * - 0..n arguments, one for each backreference (corresponding to $1, $2, etc. above).
  3707. * - The zero-based index of the match within the total search string.
  3708. * - The total string being searched.
  3709. * @param {String} [scope='one'] Use 'one' to replace the first match only, or 'all'. If not
  3710. * explicitly specified and using a regex with flag g, `scope` is 'all'.
  3711. * @returns {String} New string with one or all matches replaced.
  3712. * @example
  3713. *
  3714. * // Regex search, using named backreferences in replacement string
  3715. * var name = XRegExp('(?<first>\\w+) (?<last>\\w+)');
  3716. * XRegExp.replace('John Smith', name, '${last}, ${first}');
  3717. * // -> 'Smith, John'
  3718. *
  3719. * // Regex search, using named backreferences in replacement function
  3720. * XRegExp.replace('John Smith', name, function(match) {
  3721. * return match.last + ', ' + match.first;
  3722. * });
  3723. * // -> 'Smith, John'
  3724. *
  3725. * // String search, with replace-all
  3726. * XRegExp.replace('RegExp builds RegExps', 'RegExp', 'XRegExp', 'all');
  3727. * // -> 'XRegExp builds XRegExps'
  3728. */
  3729. XRegExp.replace = function(str, search, replacement, scope) {
  3730. var isRegex = XRegExp.isRegExp(search);
  3731. var global = (search.global && scope !== 'one') || scope === 'all';
  3732. var cacheKey = ((global ? 'g' : '') + (search.sticky ? 'y' : '')) || 'noGY';
  3733. var s2 = search;
  3734. var result;
  3735. if (isRegex) {
  3736. search[REGEX_DATA] = search[REGEX_DATA] || {};
  3737. // Shares cached copies with `XRegExp.exec`/`match`. Since a copy is used, `search`'s
  3738. // `lastIndex` isn't updated *during* replacement iterations
  3739. s2 = search[REGEX_DATA][cacheKey] || (
  3740. search[REGEX_DATA][cacheKey] = copyRegex(search, {
  3741. addG: !!global,
  3742. removeG: scope === 'one',
  3743. isInternalOnly: true
  3744. })
  3745. );
  3746. } else if (global) {
  3747. s2 = new RegExp(XRegExp.escape(String(search)), 'g');
  3748. }
  3749. // Fixed `replace` required for named backreferences, etc.
  3750. result = fixed.replace.call(toObject(str), s2, replacement);
  3751. if (isRegex && search.global) {
  3752. // Fixes IE, Safari bug (last tested IE 9, Safari 5.1)
  3753. search.lastIndex = 0;
  3754. }
  3755. return result;
  3756. };
  3757. /**
  3758. * Performs batch processing of string replacements. Used like `XRegExp.replace`, but accepts an
  3759. * array of replacement details. Later replacements operate on the output of earlier replacements.
  3760. * Replacement details are accepted as an array with a regex or string to search for, the
  3761. * replacement string or function, and an optional scope of 'one' or 'all'. Uses the XRegExp
  3762. * replacement text syntax, which supports named backreference properties via `${name}`.
  3763. *
  3764. * @memberOf XRegExp
  3765. * @param {String} str String to search.
  3766. * @param {Array} replacements Array of replacement detail arrays.
  3767. * @returns {String} New string with all replacements.
  3768. * @example
  3769. *
  3770. * str = XRegExp.replaceEach(str, [
  3771. * [XRegExp('(?<name>a)'), 'z${name}'],
  3772. * [/b/gi, 'y'],
  3773. * [/c/g, 'x', 'one'], // scope 'one' overrides /g
  3774. * [/d/, 'w', 'all'], // scope 'all' overrides lack of /g
  3775. * ['e', 'v', 'all'], // scope 'all' allows replace-all for strings
  3776. * [/f/g, function($0) {
  3777. * return $0.toUpperCase();
  3778. * }]
  3779. * ]);
  3780. */
  3781. XRegExp.replaceEach = function(str, replacements) {
  3782. var i;
  3783. var r;
  3784. for (i = 0; i < replacements.length; ++i) {
  3785. r = replacements[i];
  3786. str = XRegExp.replace(str, r[0], r[1], r[2]);
  3787. }
  3788. return str;
  3789. };
  3790. /**
  3791. * Splits a string into an array of strings using a regex or string separator. Matches of the
  3792. * separator are not included in the result array. However, if `separator` is a regex that contains
  3793. * capturing groups, backreferences are spliced into the result each time `separator` is matched.
  3794. * Fixes browser bugs compared to the native `String.prototype.split` and can be used reliably
  3795. * cross-browser.
  3796. *
  3797. * @memberOf XRegExp
  3798. * @param {String} str String to split.
  3799. * @param {RegExp|String} separator Regex or string to use for separating the string.
  3800. * @param {Number} [limit] Maximum number of items to include in the result array.
  3801. * @returns {Array} Array of substrings.
  3802. * @example
  3803. *
  3804. * // Basic use
  3805. * XRegExp.split('a b c', ' ');
  3806. * // -> ['a', 'b', 'c']
  3807. *
  3808. * // With limit
  3809. * XRegExp.split('a b c', ' ', 2);
  3810. * // -> ['a', 'b']
  3811. *
  3812. * // Backreferences in result array
  3813. * XRegExp.split('..word1..', /([a-z]+)(\d+)/i);
  3814. * // -> ['..', 'word', '1', '..']
  3815. */
  3816. XRegExp.split = function(str, separator, limit) {
  3817. return fixed.split.call(toObject(str), separator, limit);
  3818. };
  3819. /**
  3820. * Executes a regex search in a specified string. Returns `true` or `false`. Optional `pos` and
  3821. * `sticky` arguments specify the search start position, and whether the match must start at the
  3822. * specified position only. The `lastIndex` property of the provided regex is not used, but is
  3823. * updated for compatibility. Also fixes browser bugs compared to the native
  3824. * `RegExp.prototype.test` and can be used reliably cross-browser.
  3825. *
  3826. * @memberOf XRegExp
  3827. * @param {String} str String to search.
  3828. * @param {RegExp} regex Regex to search with.
  3829. * @param {Number} [pos=0] Zero-based index at which to start the search.
  3830. * @param {Boolean|String} [sticky=false] Whether the match must start at the specified position
  3831. * only. The string `'sticky'` is accepted as an alternative to `true`.
  3832. * @returns {Boolean} Whether the regex matched the provided value.
  3833. * @example
  3834. *
  3835. * // Basic use
  3836. * XRegExp.test('abc', /c/); // -> true
  3837. *
  3838. * // With pos and sticky
  3839. * XRegExp.test('abc', /c/, 0, 'sticky'); // -> false
  3840. * XRegExp.test('abc', /c/, 2, 'sticky'); // -> true
  3841. */
  3842. XRegExp.test = function(str, regex, pos, sticky) {
  3843. // Do this the easy way :-)
  3844. return !!XRegExp.exec(str, regex, pos, sticky);
  3845. };
  3846. /**
  3847. * Uninstalls optional features according to the specified options. All optional features start out
  3848. * uninstalled, so this is used to undo the actions of `XRegExp.install`.
  3849. *
  3850. * @memberOf XRegExp
  3851. * @param {Object|String} options Options object or string.
  3852. * @example
  3853. *
  3854. * // With an options object
  3855. * XRegExp.uninstall({
  3856. * // Disables support for astral code points in Unicode addons
  3857. * astral: true,
  3858. *
  3859. * // DEPRECATED: Restores native regex methods
  3860. * natives: true
  3861. * });
  3862. *
  3863. * // With an options string
  3864. * XRegExp.uninstall('astral natives');
  3865. */
  3866. XRegExp.uninstall = function(options) {
  3867. options = prepareOptions(options);
  3868. if (features.astral && options.astral) {
  3869. setAstral(false);
  3870. }
  3871. if (features.natives && options.natives) {
  3872. setNatives(false);
  3873. }
  3874. };
  3875. /**
  3876. * Returns an XRegExp object that is the union of the given patterns. Patterns can be provided as
  3877. * regex objects or strings. Metacharacters are escaped in patterns provided as strings.
  3878. * Backreferences in provided regex objects are automatically renumbered to work correctly within
  3879. * the larger combined pattern. Native flags used by provided regexes are ignored in favor of the
  3880. * `flags` argument.
  3881. *
  3882. * @memberOf XRegExp
  3883. * @param {Array} patterns Regexes and strings to combine.
  3884. * @param {String} [flags] Any combination of XRegExp flags.
  3885. * @param {Object} [options] Options object with optional properties:
  3886. * - `conjunction` {String} Type of conjunction to use: 'or' (default) or 'none'.
  3887. * @returns {RegExp} Union of the provided regexes and strings.
  3888. * @example
  3889. *
  3890. * XRegExp.union(['a+b*c', /(dogs)\1/, /(cats)\1/], 'i');
  3891. * // -> /a\+b\*c|(dogs)\1|(cats)\2/i
  3892. *
  3893. * XRegExp.union([/man/, /bear/, /pig/], 'i', {conjunction: 'none'});
  3894. * // -> /manbearpig/i
  3895. */
  3896. XRegExp.union = function(patterns, flags, options) {
  3897. options = options || {};
  3898. var conjunction = options.conjunction || 'or';
  3899. var numCaptures = 0;
  3900. var numPriorCaptures;
  3901. var captureNames;
  3902. function rewrite(match, paren, backref) {
  3903. var name = captureNames[numCaptures - numPriorCaptures];
  3904. // Capturing group
  3905. if (paren) {
  3906. ++numCaptures;
  3907. // If the current capture has a name, preserve the name
  3908. if (name) {
  3909. return '(?<' + name + '>';
  3910. }
  3911. // Backreference
  3912. } else if (backref) {
  3913. // Rewrite the backreference
  3914. return '\\' + (+backref + numPriorCaptures);
  3915. }
  3916. return match;
  3917. }
  3918. if (!(isType(patterns, 'Array') && patterns.length)) {
  3919. throw new TypeError('Must provide a nonempty array of patterns to merge');
  3920. }
  3921. var parts = /(\()(?!\?)|\\([1-9]\d*)|\\[\s\S]|\[(?:[^\\\]]|\\[\s\S])*\]/g;
  3922. var output = [];
  3923. var pattern;
  3924. for (var i = 0; i < patterns.length; ++i) {
  3925. pattern = patterns[i];
  3926. if (XRegExp.isRegExp(pattern)) {
  3927. numPriorCaptures = numCaptures;
  3928. captureNames = (pattern[REGEX_DATA] && pattern[REGEX_DATA].captureNames) || [];
  3929. // Rewrite backreferences. Passing to XRegExp dies on octals and ensures patterns are
  3930. // independently valid; helps keep this simple. Named captures are put back
  3931. output.push(nativ.replace.call(XRegExp(pattern.source).source, parts, rewrite));
  3932. } else {
  3933. output.push(XRegExp.escape(pattern));
  3934. }
  3935. }
  3936. var separator = conjunction === 'none' ? '' : '|';
  3937. return XRegExp(output.join(separator), flags);
  3938. };
  3939. // ==--------------------------==
  3940. // Fixed/extended native methods
  3941. // ==--------------------------==
  3942. /**
  3943. * Adds named capture support (with backreferences returned as `result.name`), and fixes browser
  3944. * bugs in the native `RegExp.prototype.exec`. Calling `XRegExp.install('natives')` uses this to
  3945. * override the native method. Use via `XRegExp.exec` without overriding natives.
  3946. *
  3947. * @memberOf RegExp
  3948. * @param {String} str String to search.
  3949. * @returns {Array} Match array with named backreference properties, or `null`.
  3950. */
  3951. fixed.exec = function(str) {
  3952. var origLastIndex = this.lastIndex;
  3953. var match = nativ.exec.apply(this, arguments);
  3954. var name;
  3955. var r2;
  3956. var i;
  3957. if (match) {
  3958. // Fix browsers whose `exec` methods don't return `undefined` for nonparticipating capturing
  3959. // groups. This fixes IE 5.5-8, but not IE 9's quirks mode or emulation of older IEs. IE 9
  3960. // in standards mode follows the spec.
  3961. if (!correctExecNpcg && match.length > 1 && indexOf(match, '') > -1) {
  3962. r2 = copyRegex(this, {
  3963. removeG: true,
  3964. isInternalOnly: true
  3965. });
  3966. // Using `str.slice(match.index)` rather than `match[0]` in case lookahead allowed
  3967. // matching due to characters outside the match
  3968. nativ.replace.call(String(str).slice(match.index), r2, function() {
  3969. var len = arguments.length;
  3970. var i;
  3971. // Skip index 0 and the last 2
  3972. for (i = 1; i < len - 2; ++i) {
  3973. if (arguments[i] === undefined) {
  3974. match[i] = undefined;
  3975. }
  3976. }
  3977. });
  3978. }
  3979. // Attach named capture properties
  3980. if (this[REGEX_DATA] && this[REGEX_DATA].captureNames) {
  3981. // Skip index 0
  3982. for (i = 1; i < match.length; ++i) {
  3983. name = this[REGEX_DATA].captureNames[i - 1];
  3984. if (name) {
  3985. match[name] = match[i];
  3986. }
  3987. }
  3988. }
  3989. // Fix browsers that increment `lastIndex` after zero-length matches
  3990. if (this.global && !match[0].length && (this.lastIndex > match.index)) {
  3991. this.lastIndex = match.index;
  3992. }
  3993. }
  3994. if (!this.global) {
  3995. // Fixes IE, Opera bug (last tested IE 9, Opera 11.6)
  3996. this.lastIndex = origLastIndex;
  3997. }
  3998. return match;
  3999. };
  4000. /**
  4001. * Fixes browser bugs in the native `RegExp.prototype.test`. Calling `XRegExp.install('natives')`
  4002. * uses this to override the native method.
  4003. *
  4004. * @memberOf RegExp
  4005. * @param {String} str String to search.
  4006. * @returns {Boolean} Whether the regex matched the provided value.
  4007. */
  4008. fixed.test = function(str) {
  4009. // Do this the easy way :-)
  4010. return !!fixed.exec.call(this, str);
  4011. };
  4012. /**
  4013. * Adds named capture support (with backreferences returned as `result.name`), and fixes browser
  4014. * bugs in the native `String.prototype.match`. Calling `XRegExp.install('natives')` uses this to
  4015. * override the native method.
  4016. *
  4017. * @memberOf String
  4018. * @param {RegExp|*} regex Regex to search with. If not a regex object, it is passed to `RegExp`.
  4019. * @returns {Array} If `regex` uses flag g, an array of match strings or `null`. Without flag g,
  4020. * the result of calling `regex.exec(this)`.
  4021. */
  4022. fixed.match = function(regex) {
  4023. var result;
  4024. if (!XRegExp.isRegExp(regex)) {
  4025. // Use the native `RegExp` rather than `XRegExp`
  4026. regex = new RegExp(regex);
  4027. } else if (regex.global) {
  4028. result = nativ.match.apply(this, arguments);
  4029. // Fixes IE bug
  4030. regex.lastIndex = 0;
  4031. return result;
  4032. }
  4033. return fixed.exec.call(regex, toObject(this));
  4034. };
  4035. /**
  4036. * Adds support for `${n}` tokens for named and numbered backreferences in replacement text, and
  4037. * provides named backreferences to replacement functions as `arguments[0].name`. Also fixes browser
  4038. * bugs in replacement text syntax when performing a replacement using a nonregex search value, and
  4039. * the value of a replacement regex's `lastIndex` property during replacement iterations and upon
  4040. * completion. Calling `XRegExp.install('natives')` uses this to override the native method. Note
  4041. * that this doesn't support SpiderMonkey's proprietary third (`flags`) argument. Use via
  4042. * `XRegExp.replace` without overriding natives.
  4043. *
  4044. * @memberOf String
  4045. * @param {RegExp|String} search Search pattern to be replaced.
  4046. * @param {String|Function} replacement Replacement string or a function invoked to create it.
  4047. * @returns {String} New string with one or all matches replaced.
  4048. */
  4049. fixed.replace = function(search, replacement) {
  4050. var isRegex = XRegExp.isRegExp(search);
  4051. var origLastIndex;
  4052. var captureNames;
  4053. var result;
  4054. if (isRegex) {
  4055. if (search[REGEX_DATA]) {
  4056. captureNames = search[REGEX_DATA].captureNames;
  4057. }
  4058. // Only needed if `search` is nonglobal
  4059. origLastIndex = search.lastIndex;
  4060. } else {
  4061. search += ''; // Type-convert
  4062. }
  4063. // Don't use `typeof`; some older browsers return 'function' for regex objects
  4064. if (isType(replacement, 'Function')) {
  4065. // Stringifying `this` fixes a bug in IE < 9 where the last argument in replacement
  4066. // functions isn't type-converted to a string
  4067. result = nativ.replace.call(String(this), search, function() {
  4068. var args = arguments;
  4069. var i;
  4070. if (captureNames) {
  4071. // Change the `arguments[0]` string primitive to a `String` object that can store
  4072. // properties. This really does need to use `String` as a constructor
  4073. args[0] = new String(args[0]);
  4074. // Store named backreferences on the first argument
  4075. for (i = 0; i < captureNames.length; ++i) {
  4076. if (captureNames[i]) {
  4077. args[0][captureNames[i]] = args[i + 1];
  4078. }
  4079. }
  4080. }
  4081. // Update `lastIndex` before calling `replacement`. Fixes IE, Chrome, Firefox, Safari
  4082. // bug (last tested IE 9, Chrome 17, Firefox 11, Safari 5.1)
  4083. if (isRegex && search.global) {
  4084. search.lastIndex = args[args.length - 2] + args[0].length;
  4085. }
  4086. // ES6 specs the context for replacement functions as `undefined`
  4087. return replacement.apply(undefined, args);
  4088. });
  4089. } else {
  4090. // Ensure that the last value of `args` will be a string when given nonstring `this`,
  4091. // while still throwing on null or undefined context
  4092. result = nativ.replace.call(this == null ? this : String(this), search, function() {
  4093. // Keep this function's `arguments` available through closure
  4094. var args = arguments;
  4095. return nativ.replace.call(String(replacement), replacementToken, function($0, $1, $2) {
  4096. var n;
  4097. // Named or numbered backreference with curly braces
  4098. if ($1) {
  4099. // XRegExp behavior for `${n}`:
  4100. // 1. Backreference to numbered capture, if `n` is an integer. Use `0` for the
  4101. // entire match. Any number of leading zeros may be used.
  4102. // 2. Backreference to named capture `n`, if it exists and is not an integer
  4103. // overridden by numbered capture. In practice, this does not overlap with
  4104. // numbered capture since XRegExp does not allow named capture to use a bare
  4105. // integer as the name.
  4106. // 3. If the name or number does not refer to an existing capturing group, it's
  4107. // an error.
  4108. n = +$1; // Type-convert; drop leading zeros
  4109. if (n <= args.length - 3) {
  4110. return args[n] || '';
  4111. }
  4112. // Groups with the same name is an error, else would need `lastIndexOf`
  4113. n = captureNames ? indexOf(captureNames, $1) : -1;
  4114. if (n < 0) {
  4115. throw new SyntaxError('Backreference to undefined group ' + $0);
  4116. }
  4117. return args[n + 1] || '';
  4118. }
  4119. // Else, special variable or numbered backreference without curly braces
  4120. if ($2 === '$') { // $$
  4121. return '$';
  4122. }
  4123. if ($2 === '&' || +$2 === 0) { // $&, $0 (not followed by 1-9), $00
  4124. return args[0];
  4125. }
  4126. if ($2 === '`') { // $` (left context)
  4127. return args[args.length - 1].slice(0, args[args.length - 2]);
  4128. }
  4129. if ($2 === "'") { // $' (right context)
  4130. return args[args.length - 1].slice(args[args.length - 2] + args[0].length);
  4131. }
  4132. // Else, numbered backreference without curly braces
  4133. $2 = +$2; // Type-convert; drop leading zero
  4134. // XRegExp behavior for `$n` and `$nn`:
  4135. // - Backrefs end after 1 or 2 digits. Use `${..}` for more digits.
  4136. // - `$1` is an error if no capturing groups.
  4137. // - `$10` is an error if less than 10 capturing groups. Use `${1}0` instead.
  4138. // - `$01` is `$1` if at least one capturing group, else it's an error.
  4139. // - `$0` (not followed by 1-9) and `$00` are the entire match.
  4140. // Native behavior, for comparison:
  4141. // - Backrefs end after 1 or 2 digits. Cannot reference capturing group 100+.
  4142. // - `$1` is a literal `$1` if no capturing groups.
  4143. // - `$10` is `$1` followed by a literal `0` if less than 10 capturing groups.
  4144. // - `$01` is `$1` if at least one capturing group, else it's a literal `$01`.
  4145. // - `$0` is a literal `$0`.
  4146. if (!isNaN($2)) {
  4147. if ($2 > args.length - 3) {
  4148. throw new SyntaxError('Backreference to undefined group ' + $0);
  4149. }
  4150. return args[$2] || '';
  4151. }
  4152. // `$` followed by an unsupported char is an error, unlike native JS
  4153. throw new SyntaxError('Invalid token ' + $0);
  4154. });
  4155. });
  4156. }
  4157. if (isRegex) {
  4158. if (search.global) {
  4159. // Fixes IE, Safari bug (last tested IE 9, Safari 5.1)
  4160. search.lastIndex = 0;
  4161. } else {
  4162. // Fixes IE, Opera bug (last tested IE 9, Opera 11.6)
  4163. search.lastIndex = origLastIndex;
  4164. }
  4165. }
  4166. return result;
  4167. };
  4168. /**
  4169. * Fixes browser bugs in the native `String.prototype.split`. Calling `XRegExp.install('natives')`
  4170. * uses this to override the native method. Use via `XRegExp.split` without overriding natives.
  4171. *
  4172. * @memberOf String
  4173. * @param {RegExp|String} separator Regex or string to use for separating the string.
  4174. * @param {Number} [limit] Maximum number of items to include in the result array.
  4175. * @returns {Array} Array of substrings.
  4176. */
  4177. fixed.split = function(separator, limit) {
  4178. if (!XRegExp.isRegExp(separator)) {
  4179. // Browsers handle nonregex split correctly, so use the faster native method
  4180. return nativ.split.apply(this, arguments);
  4181. }
  4182. var str = String(this);
  4183. var output = [];
  4184. var origLastIndex = separator.lastIndex;
  4185. var lastLastIndex = 0;
  4186. var lastLength;
  4187. // Values for `limit`, per the spec:
  4188. // If undefined: pow(2,32) - 1
  4189. // If 0, Infinity, or NaN: 0
  4190. // If positive number: limit = floor(limit); if (limit >= pow(2,32)) limit -= pow(2,32);
  4191. // If negative number: pow(2,32) - floor(abs(limit))
  4192. // If other: Type-convert, then use the above rules
  4193. // This line fails in very strange ways for some values of `limit` in Opera 10.5-10.63, unless
  4194. // Opera Dragonfly is open (go figure). It works in at least Opera 9.5-10.1 and 11+
  4195. limit = (limit === undefined ? -1 : limit) >>> 0;
  4196. XRegExp.forEach(str, separator, function(match) {
  4197. // This condition is not the same as `if (match[0].length)`
  4198. if ((match.index + match[0].length) > lastLastIndex) {
  4199. output.push(str.slice(lastLastIndex, match.index));
  4200. if (match.length > 1 && match.index < str.length) {
  4201. Array.prototype.push.apply(output, match.slice(1));
  4202. }
  4203. lastLength = match[0].length;
  4204. lastLastIndex = match.index + lastLength;
  4205. }
  4206. });
  4207. if (lastLastIndex === str.length) {
  4208. if (!nativ.test.call(separator, '') || lastLength) {
  4209. output.push('');
  4210. }
  4211. } else {
  4212. output.push(str.slice(lastLastIndex));
  4213. }
  4214. separator.lastIndex = origLastIndex;
  4215. return output.length > limit ? output.slice(0, limit) : output;
  4216. };
  4217. // ==--------------------------==
  4218. // Built-in syntax/flag tokens
  4219. // ==--------------------------==
  4220. /*
  4221. * Letter escapes that natively match literal characters: `\a`, `\A`, etc. These should be
  4222. * SyntaxErrors but are allowed in web reality. XRegExp makes them errors for cross-browser
  4223. * consistency and to reserve their syntax, but lets them be superseded by addons.
  4224. */
  4225. XRegExp.addToken(
  4226. /\\([ABCE-RTUVXYZaeg-mopqyz]|c(?![A-Za-z])|u(?![\dA-Fa-f]{4}|{[\dA-Fa-f]+})|x(?![\dA-Fa-f]{2}))/,
  4227. function(match, scope) {
  4228. // \B is allowed in default scope only
  4229. if (match[1] === 'B' && scope === defaultScope) {
  4230. return match[0];
  4231. }
  4232. throw new SyntaxError('Invalid escape ' + match[0]);
  4233. },
  4234. {
  4235. scope: 'all',
  4236. leadChar: '\\'
  4237. }
  4238. );
  4239. /*
  4240. * Unicode code point escape with curly braces: `\u{N..}`. `N..` is any one or more digit
  4241. * hexadecimal number from 0-10FFFF, and can include leading zeros. Requires the native ES6 `u` flag
  4242. * to support code points greater than U+FFFF. Avoids converting code points above U+FFFF to
  4243. * surrogate pairs (which could be done without flag `u`), since that could lead to broken behavior
  4244. * if you follow a `\u{N..}` token that references a code point above U+FFFF with a quantifier, or
  4245. * if you use the same in a character class.
  4246. */
  4247. XRegExp.addToken(
  4248. /\\u{([\dA-Fa-f]+)}/,
  4249. function(match, scope, flags) {
  4250. var code = dec(match[1]);
  4251. if (code > 0x10FFFF) {
  4252. throw new SyntaxError('Invalid Unicode code point ' + match[0]);
  4253. }
  4254. if (code <= 0xFFFF) {
  4255. // Converting to \uNNNN avoids needing to escape the literal character and keep it
  4256. // separate from preceding tokens
  4257. return '\\u' + pad4(hex(code));
  4258. }
  4259. // If `code` is between 0xFFFF and 0x10FFFF, require and defer to native handling
  4260. if (hasNativeU && flags.indexOf('u') > -1) {
  4261. return match[0];
  4262. }
  4263. throw new SyntaxError('Cannot use Unicode code point above \\u{FFFF} without flag u');
  4264. },
  4265. {
  4266. scope: 'all',
  4267. leadChar: '\\'
  4268. }
  4269. );
  4270. /*
  4271. * Empty character class: `[]` or `[^]`. This fixes a critical cross-browser syntax inconsistency.
  4272. * Unless this is standardized (per the ES spec), regex syntax can't be accurately parsed because
  4273. * character class endings can't be determined.
  4274. */
  4275. XRegExp.addToken(
  4276. /\[(\^?)\]/,
  4277. function(match) {
  4278. // For cross-browser compatibility with ES3, convert [] to \b\B and [^] to [\s\S].
  4279. // (?!) should work like \b\B, but is unreliable in some versions of Firefox
  4280. return match[1] ? '[\\s\\S]' : '\\b\\B';
  4281. },
  4282. {leadChar: '['}
  4283. );
  4284. /*
  4285. * Comment pattern: `(?# )`. Inline comments are an alternative to the line comments allowed in
  4286. * free-spacing mode (flag x).
  4287. */
  4288. XRegExp.addToken(
  4289. /\(\?#[^)]*\)/,
  4290. getContextualTokenSeparator,
  4291. {leadChar: '('}
  4292. );
  4293. /*
  4294. * Whitespace and line comments, in free-spacing mode (aka extended mode, flag x) only.
  4295. */
  4296. XRegExp.addToken(
  4297. /\s+|#[^\n]*\n?/,
  4298. getContextualTokenSeparator,
  4299. {flag: 'x'}
  4300. );
  4301. /*
  4302. * Dot, in dotall mode (aka singleline mode, flag s) only.
  4303. */
  4304. XRegExp.addToken(
  4305. /\./,
  4306. function() {
  4307. return '[\\s\\S]';
  4308. },
  4309. {
  4310. flag: 's',
  4311. leadChar: '.'
  4312. }
  4313. );
  4314. /*
  4315. * Named backreference: `\k<name>`. Backreference names can use the characters A-Z, a-z, 0-9, _,
  4316. * and $ only. Also allows numbered backreferences as `\k<n>`.
  4317. */
  4318. XRegExp.addToken(
  4319. /\\k<([\w$]+)>/,
  4320. function(match) {
  4321. // Groups with the same name is an error, else would need `lastIndexOf`
  4322. var index = isNaN(match[1]) ? (indexOf(this.captureNames, match[1]) + 1) : +match[1];
  4323. var endIndex = match.index + match[0].length;
  4324. if (!index || index > this.captureNames.length) {
  4325. throw new SyntaxError('Backreference to undefined group ' + match[0]);
  4326. }
  4327. // Keep backreferences separate from subsequent literal numbers. This avoids e.g.
  4328. // inadvertedly changing `(?<n>)\k<n>1` to `()\11`.
  4329. return '\\' + index + (
  4330. endIndex === match.input.length || isNaN(match.input.charAt(endIndex)) ?
  4331. '' : '(?:)'
  4332. );
  4333. },
  4334. {leadChar: '\\'}
  4335. );
  4336. /*
  4337. * Numbered backreference or octal, plus any following digits: `\0`, `\11`, etc. Octals except `\0`
  4338. * not followed by 0-9 and backreferences to unopened capture groups throw an error. Other matches
  4339. * are returned unaltered. IE < 9 doesn't support backreferences above `\99` in regex syntax.
  4340. */
  4341. XRegExp.addToken(
  4342. /\\(\d+)/,
  4343. function(match, scope) {
  4344. if (
  4345. !(
  4346. scope === defaultScope &&
  4347. /^[1-9]/.test(match[1]) &&
  4348. +match[1] <= this.captureNames.length
  4349. ) &&
  4350. match[1] !== '0'
  4351. ) {
  4352. throw new SyntaxError('Cannot use octal escape or backreference to undefined group ' +
  4353. match[0]);
  4354. }
  4355. return match[0];
  4356. },
  4357. {
  4358. scope: 'all',
  4359. leadChar: '\\'
  4360. }
  4361. );
  4362. /*
  4363. * Named capturing group; match the opening delimiter only: `(?<name>`. Capture names can use the
  4364. * characters A-Z, a-z, 0-9, _, and $ only. Names can't be integers. Supports Python-style
  4365. * `(?P<name>` as an alternate syntax to avoid issues in some older versions of Opera which natively
  4366. * supported the Python-style syntax. Otherwise, XRegExp might treat numbered backreferences to
  4367. * Python-style named capture as octals.
  4368. */
  4369. XRegExp.addToken(
  4370. /\(\?P?<([\w$]+)>/,
  4371. function(match) {
  4372. // Disallow bare integers as names because named backreferences are added to match arrays
  4373. // and therefore numeric properties may lead to incorrect lookups
  4374. if (!isNaN(match[1])) {
  4375. throw new SyntaxError('Cannot use integer as capture name ' + match[0]);
  4376. }
  4377. if (match[1] === 'length' || match[1] === '__proto__') {
  4378. throw new SyntaxError('Cannot use reserved word as capture name ' + match[0]);
  4379. }
  4380. if (indexOf(this.captureNames, match[1]) > -1) {
  4381. throw new SyntaxError('Cannot use same name for multiple groups ' + match[0]);
  4382. }
  4383. this.captureNames.push(match[1]);
  4384. this.hasNamedCapture = true;
  4385. return '(';
  4386. },
  4387. {leadChar: '('}
  4388. );
  4389. /*
  4390. * Capturing group; match the opening parenthesis only. Required for support of named capturing
  4391. * groups. Also adds explicit capture mode (flag n).
  4392. */
  4393. XRegExp.addToken(
  4394. /\((?!\?)/,
  4395. function(match, scope, flags) {
  4396. if (flags.indexOf('n') > -1) {
  4397. return '(?:';
  4398. }
  4399. this.captureNames.push(null);
  4400. return '(';
  4401. },
  4402. {
  4403. optionalFlags: 'n',
  4404. leadChar: '('
  4405. }
  4406. );
  4407. module.exports = XRegExp;
  4408. },{}]},{},[8])(8)
  4409. });