github的一些开源项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2874 lines
57 KiB

  1. # This set of tests is for UTF support, including Unicode properties. The
  2. # Unicode tests are all compatible with all versions of Perl >= 5.10, but
  3. # some of the property tests may differ because of different versions of
  4. # Unicode in use by PCRE2 and Perl.
  5. # WARNING: Use only / as the pattern delimiter. Although pcre2test supports
  6. # a number of delimiters, all those other than / give problems with the
  7. # perltest.sh script.
  8. #newline_default lf anycrlf any
  9. #perltest
  10. /a.b/utf
  11. acb
  12. a\x7fb
  13. a\x{100}b
  14. \= Expect no match
  15. a\nb
  16. /a(.{3})b/utf
  17. a\x{4000}xyb
  18. a\x{4000}\x7fyb
  19. a\x{4000}\x{100}yb
  20. \= Expect no match
  21. a\x{4000}b
  22. ac\ncb
  23. /a(.*?)(.)/
  24. a\xc0\x88b
  25. /a(.*?)(.)/utf
  26. a\x{100}b
  27. /a(.*)(.)/
  28. a\xc0\x88b
  29. /a(.*)(.)/utf
  30. a\x{100}b
  31. /a(.)(.)/
  32. a\xc0\x92bcd
  33. /a(.)(.)/utf
  34. a\x{240}bcd
  35. /a(.?)(.)/
  36. a\xc0\x92bcd
  37. /a(.?)(.)/utf
  38. a\x{240}bcd
  39. /a(.??)(.)/
  40. a\xc0\x92bcd
  41. /a(.??)(.)/utf
  42. a\x{240}bcd
  43. /a(.{3})b/utf
  44. a\x{1234}xyb
  45. a\x{1234}\x{4321}yb
  46. a\x{1234}\x{4321}\x{3412}b
  47. \= Expect no match
  48. a\x{1234}b
  49. ac\ncb
  50. /a(.{3,})b/utf
  51. a\x{1234}xyb
  52. a\x{1234}\x{4321}yb
  53. a\x{1234}\x{4321}\x{3412}b
  54. axxxxbcdefghijb
  55. a\x{1234}\x{4321}\x{3412}\x{3421}b
  56. \= Expect no match
  57. a\x{1234}b
  58. /a(.{3,}?)b/utf
  59. a\x{1234}xyb
  60. a\x{1234}\x{4321}yb
  61. a\x{1234}\x{4321}\x{3412}b
  62. axxxxbcdefghijb
  63. a\x{1234}\x{4321}\x{3412}\x{3421}b
  64. \= Expect no match
  65. a\x{1234}b
  66. /a(.{3,5})b/utf
  67. a\x{1234}xyb
  68. a\x{1234}\x{4321}yb
  69. a\x{1234}\x{4321}\x{3412}b
  70. axxxxbcdefghijb
  71. a\x{1234}\x{4321}\x{3412}\x{3421}b
  72. axbxxbcdefghijb
  73. axxxxxbcdefghijb
  74. \= Expect no match
  75. a\x{1234}b
  76. axxxxxxbcdefghijb
  77. /a(.{3,5}?)b/utf
  78. a\x{1234}xyb
  79. a\x{1234}\x{4321}yb
  80. a\x{1234}\x{4321}\x{3412}b
  81. axxxxbcdefghijb
  82. a\x{1234}\x{4321}\x{3412}\x{3421}b
  83. axbxxbcdefghijb
  84. axxxxxbcdefghijb
  85. \= Expect no match
  86. a\x{1234}b
  87. axxxxxxbcdefghijb
  88. /^[a\x{c0}]/utf
  89. \= Expect no match
  90. \x{100}
  91. /(?<=aXb)cd/utf
  92. aXbcd
  93. /(?<=a\x{100}b)cd/utf
  94. a\x{100}bcd
  95. /(?<=a\x{100000}b)cd/utf
  96. a\x{100000}bcd
  97. /(?:\x{100}){3}b/utf
  98. \x{100}\x{100}\x{100}b
  99. \= Expect no match
  100. \x{100}\x{100}b
  101. /\x{ab}/utf
  102. \x{ab}
  103. \xc2\xab
  104. \= Expect no match
  105. \x00{ab}
  106. /(?<=(.))X/utf
  107. WXYZ
  108. \x{256}XYZ
  109. \= Expect no match
  110. XYZ
  111. /[^a]+/g,utf
  112. bcd
  113. \x{100}aY\x{256}Z
  114. /^[^a]{2}/utf
  115. \x{100}bc
  116. /^[^a]{2,}/utf
  117. \x{100}bcAa
  118. /^[^a]{2,}?/utf
  119. \x{100}bca
  120. /[^a]+/gi,utf
  121. bcd
  122. \x{100}aY\x{256}Z
  123. /^[^a]{2}/i,utf
  124. \x{100}bc
  125. /^[^a]{2,}/i,utf
  126. \x{100}bcAa
  127. /^[^a]{2,}?/i,utf
  128. \x{100}bca
  129. /\x{100}{0,0}/utf
  130. abcd
  131. /\x{100}?/utf
  132. abcd
  133. \x{100}\x{100}
  134. /\x{100}{0,3}/utf
  135. \x{100}\x{100}
  136. \x{100}\x{100}\x{100}\x{100}
  137. /\x{100}*/utf
  138. abce
  139. \x{100}\x{100}\x{100}\x{100}
  140. /\x{100}{1,1}/utf
  141. abcd\x{100}\x{100}\x{100}\x{100}
  142. /\x{100}{1,3}/utf
  143. abcd\x{100}\x{100}\x{100}\x{100}
  144. /\x{100}+/utf
  145. abcd\x{100}\x{100}\x{100}\x{100}
  146. /\x{100}{3}/utf
  147. abcd\x{100}\x{100}\x{100}XX
  148. /\x{100}{3,5}/utf
  149. abcd\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}XX
  150. /\x{100}{3,}/utf
  151. abcd\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}XX
  152. /(?<=a\x{100}{2}b)X/utf,aftertext
  153. Xyyya\x{100}\x{100}bXzzz
  154. /\D*/utf
  155. aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  156. /\D*/utf
  157. \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
  158. /\D/utf
  159. 1X2
  160. 1\x{100}2
  161. />\S/utf
  162. > >X Y
  163. > >\x{100} Y
  164. /\d/utf
  165. \x{100}3
  166. /\s/utf
  167. \x{100} X
  168. /\D+/utf
  169. 12abcd34
  170. \= Expect no match
  171. 1234
  172. /\D{2,3}/utf
  173. 12abcd34
  174. 12ab34
  175. \= Expect no match
  176. 1234
  177. 12a34
  178. /\D{2,3}?/utf
  179. 12abcd34
  180. 12ab34
  181. \= Expect no match
  182. 1234
  183. 12a34
  184. /\d+/utf
  185. 12abcd34
  186. /\d{2,3}/utf
  187. 12abcd34
  188. 1234abcd
  189. \= Expect no match
  190. 1.4
  191. /\d{2,3}?/utf
  192. 12abcd34
  193. 1234abcd
  194. \= Expect no match
  195. 1.4
  196. /\S+/utf
  197. 12abcd34
  198. \= Expect no match
  199. \ \
  200. /\S{2,3}/utf
  201. 12abcd34
  202. 1234abcd
  203. \= Expect no match
  204. \ \
  205. /\S{2,3}?/utf
  206. 12abcd34
  207. 1234abcd
  208. \= Expect no match
  209. \ \
  210. />\s+</utf,aftertext
  211. 12> <34
  212. />\s{2,3}</utf,aftertext
  213. ab> <cd
  214. ab> <ce
  215. \= Expect no match
  216. ab> <cd
  217. />\s{2,3}?</utf,aftertext
  218. ab> <cd
  219. ab> <ce
  220. \= Expect no match
  221. ab> <cd
  222. /\w+/utf
  223. 12 34
  224. \= Expect no match
  225. +++=*!
  226. /\w{2,3}/utf
  227. ab cd
  228. abcd ce
  229. \= Expect no match
  230. a.b.c
  231. /\w{2,3}?/utf
  232. ab cd
  233. abcd ce
  234. \= Expect no match
  235. a.b.c
  236. /\W+/utf
  237. 12====34
  238. \= Expect no match
  239. abcd
  240. /\W{2,3}/utf
  241. ab====cd
  242. ab==cd
  243. \= Expect no match
  244. a.b.c
  245. /\W{2,3}?/utf
  246. ab====cd
  247. ab==cd
  248. \= Expect no match
  249. a.b.c
  250. /[\x{100}]/utf
  251. \x{100}
  252. Z\x{100}
  253. \x{100}Z
  254. /[Z\x{100}]/utf
  255. Z\x{100}
  256. \x{100}
  257. \x{100}Z
  258. /[\x{100}\x{200}]/utf
  259. ab\x{100}cd
  260. ab\x{200}cd
  261. /[\x{100}-\x{200}]/utf
  262. ab\x{100}cd
  263. ab\x{200}cd
  264. ab\x{111}cd
  265. /[z-\x{200}]/utf
  266. ab\x{100}cd
  267. ab\x{200}cd
  268. ab\x{111}cd
  269. abzcd
  270. ab|cd
  271. /[Q\x{100}\x{200}]/utf
  272. ab\x{100}cd
  273. ab\x{200}cd
  274. Q?
  275. /[Q\x{100}-\x{200}]/utf
  276. ab\x{100}cd
  277. ab\x{200}cd
  278. ab\x{111}cd
  279. Q?
  280. /[Qz-\x{200}]/utf
  281. ab\x{100}cd
  282. ab\x{200}cd
  283. ab\x{111}cd
  284. abzcd
  285. ab|cd
  286. Q?
  287. /[\x{100}\x{200}]{1,3}/utf
  288. ab\x{100}cd
  289. ab\x{200}cd
  290. ab\x{200}\x{100}\x{200}\x{100}cd
  291. /[\x{100}\x{200}]{1,3}?/utf
  292. ab\x{100}cd
  293. ab\x{200}cd
  294. ab\x{200}\x{100}\x{200}\x{100}cd
  295. /[Q\x{100}\x{200}]{1,3}/utf
  296. ab\x{100}cd
  297. ab\x{200}cd
  298. ab\x{200}\x{100}\x{200}\x{100}cd
  299. /[Q\x{100}\x{200}]{1,3}?/utf
  300. ab\x{100}cd
  301. ab\x{200}cd
  302. ab\x{200}\x{100}\x{200}\x{100}cd
  303. /(?<=[\x{100}\x{200}])X/utf
  304. abc\x{200}X
  305. abc\x{100}X
  306. \= Expect no match
  307. X
  308. /(?<=[Q\x{100}\x{200}])X/utf
  309. abc\x{200}X
  310. abc\x{100}X
  311. abQX
  312. \= Expect no match
  313. X
  314. /(?<=[\x{100}\x{200}]{3})X/utf
  315. abc\x{100}\x{200}\x{100}X
  316. \= Expect no match
  317. abc\x{200}X
  318. X
  319. /[^\x{100}\x{200}]X/utf
  320. AX
  321. \x{150}X
  322. \x{500}X
  323. \= Expect no match
  324. \x{100}X
  325. \x{200}X
  326. /[^Q\x{100}\x{200}]X/utf
  327. AX
  328. \x{150}X
  329. \x{500}X
  330. \= Expect no match
  331. \x{100}X
  332. \x{200}X
  333. QX
  334. /[^\x{100}-\x{200}]X/utf
  335. AX
  336. \x{500}X
  337. \= Expect no match
  338. \x{100}X
  339. \x{150}X
  340. \x{200}X
  341. /[z-\x{100}]/i,utf
  342. z
  343. Z
  344. \x{100}
  345. \= Expect no match
  346. \x{102}
  347. y
  348. /[\xFF]/
  349. >\xff<
  350. /[\xff]/utf
  351. >\x{ff}<
  352. /[^\xFF]/
  353. XYZ
  354. /[^\xff]/utf
  355. XYZ
  356. \x{123}
  357. /^[ac]*b/utf
  358. \= Expect no match
  359. xb
  360. /^[ac\x{100}]*b/utf
  361. \= Expect no match
  362. xb
  363. /^[^x]*b/i,utf
  364. \= Expect no match
  365. xb
  366. /^[^x]*b/utf
  367. \= Expect no match
  368. xb
  369. /^\d*b/utf
  370. \= Expect no match
  371. xb
  372. /(|a)/g,utf
  373. catac
  374. a\x{256}a
  375. /^\x{85}$/i,utf
  376. \x{85}
  377. /^ሴ/utf
  378. /^\ሴ/utf
  379. /(?s)(.{1,5})/utf
  380. abcdefg
  381. ab
  382. /a*\x{100}*\w/utf
  383. a
  384. /\S\S/g,utf
  385. A\x{a3}BC
  386. /\S{2}/g,utf
  387. A\x{a3}BC
  388. /\W\W/g,utf
  389. +\x{a3}==
  390. /\W{2}/g,utf
  391. +\x{a3}==
  392. /\S/g,utf
  393. \x{442}\x{435}\x{441}\x{442}
  394. /[\S]/g,utf
  395. \x{442}\x{435}\x{441}\x{442}
  396. /\D/g,utf
  397. \x{442}\x{435}\x{441}\x{442}
  398. /[\D]/g,utf
  399. \x{442}\x{435}\x{441}\x{442}
  400. /\W/g,utf
  401. \x{2442}\x{2435}\x{2441}\x{2442}
  402. /[\W]/g,utf
  403. \x{2442}\x{2435}\x{2441}\x{2442}
  404. /[\S\s]*/utf
  405. abc\n\r\x{442}\x{435}\x{441}\x{442}xyz
  406. /[\x{41f}\S]/g,utf
  407. \x{442}\x{435}\x{441}\x{442}
  408. /.[^\S]./g,utf
  409. abc def\x{442}\x{443}xyz\npqr
  410. /.[^\S\n]./g,utf
  411. abc def\x{442}\x{443}xyz\npqr
  412. /[[:^alnum:]]/g,utf
  413. +\x{2442}
  414. /[[:^alpha:]]/g,utf
  415. +\x{2442}
  416. /[[:^ascii:]]/g,utf
  417. A\x{442}
  418. /[[:^blank:]]/g,utf
  419. A\x{442}
  420. /[[:^cntrl:]]/g,utf
  421. A\x{442}
  422. /[[:^digit:]]/g,utf
  423. A\x{442}
  424. /[[:^graph:]]/g,utf
  425. \x19\x{e01ff}
  426. /[[:^lower:]]/g,utf
  427. A\x{422}
  428. /[[:^print:]]/g,utf
  429. \x{19}\x{e01ff}
  430. /[[:^punct:]]/g,utf
  431. A\x{442}
  432. /[[:^space:]]/g,utf
  433. A\x{442}
  434. /[[:^upper:]]/g,utf
  435. a\x{442}
  436. /[[:^word:]]/g,utf
  437. +\x{2442}
  438. /[[:^xdigit:]]/g,utf
  439. M\x{442}
  440. /[^ABCDEFGHIJKLMNOPQRSTUVWXYZÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮİIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŸŹŻŽƁƂƄƆƇƉƊƋƎƏƐƑƓƔƖƗƘƜƝƟƠƢƤƦƧƩƬƮƯƱƲƳƵƷƸƼDŽLJNJǍǏǑǓǕǗǙǛǞǠǢǤǦǨǪǬǮDZǴǶǷǸǺǼǾȀȂȄȆȈȊȌȎȐȒȔȖȘȚȜȞȠȢȤȦȨȪȬȮȰȲȺȻȽȾɁΆΈΉΊΌΎΏΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩΪΫϒϓϔϘϚϜϞϠϢϤϦϨϪϬϮϴϷϹϺϽϾϿЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯѠѢѤѦѨѪѬѮѰѲѴѶѸѺѼѾҀҊҌҎҐҒҔҖҘҚҜҞҠҢҤҦҨҪҬҮҰҲҴҶҸҺҼҾӀӁӃӅӇӉӋӍӐӒӔӖӘӚӜӞӠӢӤӦӨӪӬӮӰӲӴӶӸԀԂԄԆԈԊԌԎԱԲԳԴԵԶԷԸԹԺԻԼԽԾԿՀՁՂՃՄՅՆՇՈՉՊՋՌՍՎՏՐՑՒՓՔՕՖႠႡႢႣႤႥႦႧႨႩႪႫႬႭႮႯႰႱႲႳႴႵႶႷႸႹႺႻႼႽႾႿჀჁჂჃჄჅḀḂḄḆḈḊḌḎḐḒḔḖḘḚḜḞḠḢḤḦḨḪḬḮḰḲḴḶḸḺḼḾṀṂṄṆṈṊṌṎṐṒṔṖṘṚṜṞṠṢṤṦṨṪṬṮṰṲṴṶṸṺṼṾẀẂẄẆẈẊẌẎẐẒẔẠẢẤẦẨẪẬẮẰẲẴẶẸẺẼẾỀỂỄỆỈỊỌỎỐỒỔỖỘỚỜỞỠỢỤỦỨỪỬỮỰỲỴỶỸἈἉἊἋἌἍἎἏἘἙἚἛἜἝἨἩἪἫἬἭἮἯἸἹἺἻἼἽἾἿὈὉὊὋὌὍὙὛὝὟὨὩὪὫὬὭὮὯᾸᾹᾺΆῈΈῊΉῘῙῚΊῨῩῪΎῬῸΌῺΏabcdefghijklmnopqrstuvwxyzªµºßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿāăąćĉċčďđēĕėęěĝğġģĥħĩīĭįıijĵķĸĺļľŀłńņňʼnŋōŏőœŕŗřśŝşšţťŧũūŭůűųŵŷźżžſƀƃƅƈƌƍƒƕƙƚƛƞơƣƥƨƪƫƭưƴƶƹƺƽƾƿdžljnjǎǐǒǔǖǘǚǜǝǟǡǣǥǧǩǫǭǯǰdzǵǹǻǽǿȁȃȅȇȉȋȍȏȑȓȕȗșțȝȟȡȣȥȧȩȫȭȯȱȳȴȵȶȷȸȹȼȿɀɐɑɒɓɔɕɖɗɘəɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯΐάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώϐϑϕϖϗϙϛϝϟϡϣϥϧϩϫϭϯϰϱϲϳϵϸϻϼабвгдежзийклмнопрстуфхцчшщъыьэюяѐёђѓєѕіїјљњћќѝўџѡѣѥѧѩѫѭѯѱѳѵѷѹѻѽѿҁҋҍҏґғҕҗҙқҝҟҡңҥҧҩҫҭүұҳҵҷҹһҽҿӂӄӆӈӊӌӎӑӓӕӗәӛӝӟӡӣӥӧөӫӭӯӱӳӵӷӹԁԃԅԇԉԋԍԏաբգդեզէըթժիլխծկհձղճմյնշոչպջռսվտրցւփքօֆևᴀᴁᴂᴃᴄᴅᴆᴇᴈᴉᴊᴋᴌᴍᴎᴏᴐᴑᴒᴓᴔᴕᴖᴗᴘᴙᴚᴛᴜᴝᴞᴟᴠᴡᴢᴣᴤᴥᴦᴧᴨᴩᴪᴫᵢᵣᵤᵥᵦᵧᵨᵩᵪᵫᵬᵭᵮᵯᵰᵱᵲᵳᵴᵵᵶᵷᵹᵺᵻᵼᵽᵾᵿᶀᶁᶂᶃᶄᶅᶆᶇᶈᶉᶊᶋᶌᶍᶎᶏᶐᶑᶒᶓᶔᶕᶖᶗᶘᶙᶚḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕẖẗẘẙẚẛạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹἀἁἂἃἄἅἆἇἐἑἒἓἔἕἠἡἢἣἤἥἦἧἰἱἲἳἴἵἶἷὀὁὂὃὄὅὐὑὒὓὔὕὖὗὠὡὢὣὤὥὦὧὰάὲέὴήὶίὸόὺύὼώᾀᾁᾂᾃᾄᾅᾆᾇᾐᾑᾒᾓᾔᾕᾖᾗᾠᾡᾢᾣᾤᾥᾦᾧᾰᾱᾲᾳᾴᾶᾷιῂῃῄῆῇῐῑῒΐῖῗῠῡῢΰῤῥῦῧῲῳῴῶῷⲁⲃⲅⲇⲉⲋⲍⲏⲑⲓⲕⲗⲙⲛⲝⲟⲡⲣⲥⲧⲩⲫⲭⲯⲱⲳⲵⲷⲹⲻⲽⲿⳁⳃⳅⳇⳉⳋⳍⳏⳑⳓⳕⳗⳙⳛⳝⳟⳡⳣⳤⴀⴁⴂⴃⴄⴅⴆⴇⴈⴉⴊⴋⴌⴍⴎⴏⴐⴑⴒⴓⴔⴕⴖⴗⴘⴙⴚⴛⴜⴝⴞⴟⴠⴡⴢⴣⴤⴥfffiflffifflſtstﬓﬔﬕﬖﬗ\d_^]/utf
  441. /^[^d]*?$/
  442. abc
  443. /^[^d]*?$/utf
  444. abc
  445. /^[^d]*?$/i
  446. abc
  447. /^[^d]*?$/i,utf
  448. abc
  449. /(?i)[\xc3\xa9\xc3\xbd]|[\xc3\xa9\xc3\xbdA]/utf
  450. /^[a\x{c0}]b/utf
  451. \x{c0}b
  452. /^([a\x{c0}]*?)aa/utf
  453. a\x{c0}aaaa/
  454. /^([a\x{c0}]*?)aa/utf
  455. a\x{c0}aaaa/
  456. a\x{c0}a\x{c0}aaa/
  457. /^([a\x{c0}]*)aa/utf
  458. a\x{c0}aaaa/
  459. a\x{c0}a\x{c0}aaa/
  460. /^([a\x{c0}]*)a\x{c0}/utf
  461. a\x{c0}aaaa/
  462. a\x{c0}a\x{c0}aaa/
  463. /A*/g,utf
  464. AAB\x{123}BAA
  465. /(abc)\1/i,utf
  466. \= Expect no match
  467. abc
  468. /(abc)\1/utf
  469. \= Expect no match
  470. abc
  471. /a(*:a\x{1234}b)/utf,mark
  472. abc
  473. /a(*:a£b)/utf,mark
  474. abc
  475. # Noncharacters
  476. /./utf
  477. \x{fffe}
  478. \x{ffff}
  479. \x{1fffe}
  480. \x{1ffff}
  481. \x{2fffe}
  482. \x{2ffff}
  483. \x{3fffe}
  484. \x{3ffff}
  485. \x{4fffe}
  486. \x{4ffff}
  487. \x{5fffe}
  488. \x{5ffff}
  489. \x{6fffe}
  490. \x{6ffff}
  491. \x{7fffe}
  492. \x{7ffff}
  493. \x{8fffe}
  494. \x{8ffff}
  495. \x{9fffe}
  496. \x{9ffff}
  497. \x{afffe}
  498. \x{affff}
  499. \x{bfffe}
  500. \x{bffff}
  501. \x{cfffe}
  502. \x{cffff}
  503. \x{dfffe}
  504. \x{dffff}
  505. \x{efffe}
  506. \x{effff}
  507. \x{ffffe}
  508. \x{fffff}
  509. \x{10fffe}
  510. \x{10ffff}
  511. \x{fdd0}
  512. \x{fdd1}
  513. \x{fdd2}
  514. \x{fdd3}
  515. \x{fdd4}
  516. \x{fdd5}
  517. \x{fdd6}
  518. \x{fdd7}
  519. \x{fdd8}
  520. \x{fdd9}
  521. \x{fdda}
  522. \x{fddb}
  523. \x{fddc}
  524. \x{fddd}
  525. \x{fdde}
  526. \x{fddf}
  527. \x{fde0}
  528. \x{fde1}
  529. \x{fde2}
  530. \x{fde3}
  531. \x{fde4}
  532. \x{fde5}
  533. \x{fde6}
  534. \x{fde7}
  535. \x{fde8}
  536. \x{fde9}
  537. \x{fdea}
  538. \x{fdeb}
  539. \x{fdec}
  540. \x{fded}
  541. \x{fdee}
  542. \x{fdef}
  543. /^\d*\w{4}/utf
  544. 1234
  545. \= Expect no match
  546. 123
  547. /^[^b]*\w{4}/utf
  548. aaaa
  549. \= Expect no match
  550. aaa
  551. /^[^b]*\w{4}/i,utf
  552. aaaa
  553. \= Expect no match
  554. aaa
  555. /^\x{100}*.{4}/utf
  556. \x{100}\x{100}\x{100}\x{100}
  557. \= Expect no match
  558. \x{100}\x{100}\x{100}
  559. /^\x{100}*.{4}/i,utf
  560. \x{100}\x{100}\x{100}\x{100}
  561. \= Expect no match
  562. \x{100}\x{100}\x{100}
  563. /^a+[a\x{200}]/utf
  564. aa
  565. /^.\B.\B./utf
  566. \x{10123}\x{10124}\x{10125}
  567. /^#[^\x{ffff}]#[^\x{ffff}]#[^\x{ffff}]#/utf
  568. #\x{10000}#\x{100}#\x{10ffff}#
  569. # Unicode property support tests
  570. /^\pC\pL\pM\pN\pP\pS\pZ</utf
  571. \x7f\x{c0}\x{30f}\x{660}\x{66c}\x{f01}\x{1680}<
  572. \np\x{300}9!\$ <
  573. \= Expect no match
  574. ap\x{300}9!\$ <
  575. /^\PC/utf
  576. X
  577. \= Expect no match
  578. \x7f
  579. /^\PL/utf
  580. 9
  581. \= Expect no match
  582. \x{c0}
  583. /^\PM/utf
  584. X
  585. \= Expect no match
  586. \x{30f}
  587. /^\PN/utf
  588. X
  589. \= Expect no match
  590. \x{660}
  591. /^\PP/utf
  592. X
  593. \= Expect no match
  594. \x{66c}
  595. /^\PS/utf
  596. X
  597. \= Expect no match
  598. \x{f01}
  599. /^\PZ/utf
  600. X
  601. \= Expect no match
  602. \x{1680}
  603. /^\p{Cc}/utf
  604. \x{017}
  605. \x{09f}
  606. \= Expect no match
  607. \x{0600}
  608. /^\p{Cf}/utf
  609. \x{601}
  610. \= Expect no match
  611. \x{09f}
  612. /^\p{Cn}/utf
  613. \x{e0000}
  614. \= Expect no match
  615. \x{09f}
  616. /^\p{Co}/utf
  617. \x{f8ff}
  618. \= Expect no match
  619. \x{09f}
  620. /^\p{Ll}/utf
  621. a
  622. \= Expect no match
  623. Z
  624. \x{e000}
  625. /^\p{Lm}/utf
  626. \x{2b0}
  627. \= Expect no match
  628. a
  629. /^\p{Lo}/utf
  630. \x{1bb}
  631. \x{3400}
  632. \x{3401}
  633. \x{4d00}
  634. \x{4db4}
  635. \x{4db5}
  636. \x{4db6}
  637. \= Expect no match
  638. a
  639. \x{2b0}
  640. /^\p{Lt}/utf
  641. \x{1c5}
  642. \= Expect no match
  643. a
  644. \x{2b0}
  645. /^\p{Lu}/utf
  646. A
  647. \= Expect no match
  648. \x{2b0}
  649. /^\p{Mc}/utf
  650. \x{903}
  651. \= Expect no match
  652. X
  653. \x{300}
  654. /^\p{Me}/utf
  655. \x{488}
  656. \= Expect no match
  657. X
  658. \x{903}
  659. \x{300}
  660. /^\p{Mn}/utf
  661. \x{300}
  662. \= Expect no match
  663. X
  664. \x{903}
  665. /^\p{Nd}+/utf
  666. 0123456789\x{660}\x{661}\x{662}\x{663}\x{664}\x{665}\x{666}\x{667}\x{668}\x{669}\x{66a}
  667. \x{6f0}\x{6f1}\x{6f2}\x{6f3}\x{6f4}\x{6f5}\x{6f6}\x{6f7}\x{6f8}\x{6f9}\x{6fa}
  668. \x{966}\x{967}\x{968}\x{969}\x{96a}\x{96b}\x{96c}\x{96d}\x{96e}\x{96f}\x{970}
  669. \= Expect no match
  670. X
  671. /^\p{Nl}/utf
  672. \x{16ee}
  673. \= Expect no match
  674. X
  675. \x{966}
  676. /^\p{No}/utf
  677. \x{b2}
  678. \x{b3}
  679. \= Expect no match
  680. X
  681. \x{16ee}
  682. /^\p{Pc}/utf
  683. \x5f
  684. \x{203f}
  685. \= Expect no match
  686. X
  687. -
  688. \x{58a}
  689. /^\p{Pd}/utf
  690. -
  691. \x{58a}
  692. \= Expect no match
  693. X
  694. \x{203f}
  695. /^\p{Pe}/utf
  696. )
  697. ]
  698. }
  699. \x{f3b}
  700. \= Expect no match
  701. X
  702. \x{203f}
  703. (
  704. [
  705. {
  706. \x{f3c}
  707. /^\p{Pf}/utf
  708. \x{bb}
  709. \x{2019}
  710. \= Expect no match
  711. X
  712. \x{203f}
  713. /^\p{Pi}/utf
  714. \x{ab}
  715. \x{2018}
  716. \= Expect no match
  717. X
  718. \x{203f}
  719. /^\p{Po}/utf
  720. !
  721. \x{37e}
  722. \= Expect no match
  723. X
  724. \x{203f}
  725. /^\p{Ps}/utf
  726. (
  727. [
  728. {
  729. \x{f3c}
  730. \= Expect no match
  731. X
  732. )
  733. ]
  734. }
  735. \x{f3b}
  736. /^\p{Sk}/utf
  737. \x{2c2}
  738. \= Expect no match
  739. X
  740. \x{9f2}
  741. /^\p{Sm}+/utf
  742. +<|~\x{ac}\x{2044}
  743. \= Expect no match
  744. X
  745. \x{9f2}
  746. /^\p{So}/utf
  747. \x{a6}
  748. \x{482}
  749. \= Expect no match
  750. X
  751. \x{9f2}
  752. /^\p{Zl}/utf
  753. \x{2028}
  754. \= Expect no match
  755. X
  756. \x{2029}
  757. /^\p{Zp}/utf
  758. \x{2029}
  759. \= Expect no match
  760. X
  761. \x{2028}
  762. /\p{Nd}+(..)/utf
  763. \x{660}\x{661}\x{662}ABC
  764. /\p{Nd}+?(..)/utf
  765. \x{660}\x{661}\x{662}ABC
  766. /\p{Nd}{2,}(..)/utf
  767. \x{660}\x{661}\x{662}ABC
  768. /\p{Nd}{2,}?(..)/utf
  769. \x{660}\x{661}\x{662}ABC
  770. /\p{Nd}*(..)/utf
  771. \x{660}\x{661}\x{662}ABC
  772. /\p{Nd}*?(..)/utf
  773. \x{660}\x{661}\x{662}ABC
  774. /\p{Nd}{2}(..)/utf
  775. \x{660}\x{661}\x{662}ABC
  776. /\p{Nd}{2,3}(..)/utf
  777. \x{660}\x{661}\x{662}ABC
  778. /\p{Nd}{2,3}?(..)/utf
  779. \x{660}\x{661}\x{662}ABC
  780. /\p{Nd}?(..)/utf
  781. \x{660}\x{661}\x{662}ABC
  782. /\p{Nd}??(..)/utf
  783. \x{660}\x{661}\x{662}ABC
  784. /\p{Nd}*+(..)/utf
  785. \x{660}\x{661}\x{662}ABC
  786. /\p{Nd}*+(...)/utf
  787. \x{660}\x{661}\x{662}ABC
  788. /\p{Nd}*+(....)/utf
  789. \= Expect no match
  790. \x{660}\x{661}\x{662}ABC
  791. /(?<=A\p{Nd})XYZ/utf
  792. A2XYZ
  793. 123A5XYZPQR
  794. ABA\x{660}XYZpqr
  795. \= Expect no match
  796. AXYZ
  797. XYZ
  798. /(?<!\pL)XYZ/utf
  799. 1XYZ
  800. AB=XYZ..
  801. XYZ
  802. \= Expect no match
  803. WXYZ
  804. /[\P{Nd}]+/utf
  805. abcd
  806. \= Expect no match
  807. 1234
  808. /\D+/utf
  809. aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  810. \= Expect no match
  811. 11111111111111111111111111111111111111111111111111111111111111111111111
  812. /\P{Nd}+/utf
  813. aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  814. \= Expect no match
  815. 11111111111111111111111111111111111111111111111111111111111111111111111
  816. /[\D]+/utf
  817. aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  818. \= Expect no match
  819. 11111111111111111111111111111111111111111111111111111111111111111111111
  820. /[\P{Nd}]+/utf
  821. aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  822. \= Expect no match
  823. 11111111111111111111111111111111111111111111111111111111111111111111111
  824. /[\D\P{Nd}]+/utf
  825. aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  826. \= Expect no match
  827. 11111111111111111111111111111111111111111111111111111111111111111111111
  828. /\pL/utf
  829. a
  830. A
  831. /\pL/i,utf
  832. a
  833. A
  834. /\p{Lu}/utf
  835. A
  836. aZ
  837. \= Expect no match
  838. abc
  839. /\p{Ll}/utf
  840. a
  841. Az
  842. \= Expect no match
  843. ABC
  844. /A\x{391}\x{10427}\x{ff3a}\x{1fb0}/utf
  845. A\x{391}\x{10427}\x{ff3a}\x{1fb0}
  846. \= Expect no match
  847. a\x{391}\x{10427}\x{ff3a}\x{1fb0}
  848. A\x{3b1}\x{10427}\x{ff3a}\x{1fb0}
  849. A\x{391}\x{1044F}\x{ff3a}\x{1fb0}
  850. A\x{391}\x{10427}\x{ff5a}\x{1fb0}
  851. A\x{391}\x{10427}\x{ff3a}\x{1fb8}
  852. /A\x{391}\x{10427}\x{ff3a}\x{1fb0}/i,utf
  853. A\x{391}\x{10427}\x{ff3a}\x{1fb0}
  854. a\x{391}\x{10427}\x{ff3a}\x{1fb0}
  855. A\x{3b1}\x{10427}\x{ff3a}\x{1fb0}
  856. A\x{391}\x{1044F}\x{ff3a}\x{1fb0}
  857. A\x{391}\x{10427}\x{ff5a}\x{1fb0}
  858. A\x{391}\x{10427}\x{ff3a}\x{1fb8}
  859. /\x{391}+/i,utf
  860. \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}
  861. /\x{391}{3,5}(.)/i,utf
  862. \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}X
  863. /\x{391}{3,5}?(.)/i,utf
  864. \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}X
  865. /[\x{391}\x{ff3a}]/i,utf
  866. \x{391}
  867. \x{ff3a}
  868. \x{3b1}
  869. \x{ff5a}
  870. /^(\X*)C/utf
  871. A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
  872. A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
  873. /^(\X*?)C/utf
  874. A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
  875. A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
  876. /^(\X*)(.)/utf
  877. A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
  878. A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
  879. /^(\X*?)(.)/utf
  880. A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
  881. A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
  882. /^\X(.)/utf
  883. \= Expect no match
  884. A\x{300}\x{301}\x{302}
  885. /^\X{2,3}(.)/utf
  886. A\x{300}\x{301}B\x{300}X
  887. A\x{300}\x{301}B\x{300}C\x{300}\x{301}
  888. A\x{300}\x{301}B\x{300}C\x{300}\x{301}X
  889. A\x{300}\x{301}B\x{300}C\x{300}\x{301}DA\x{300}X
  890. /^\X{2,3}?(.)/utf
  891. A\x{300}\x{301}B\x{300}X
  892. A\x{300}\x{301}B\x{300}C\x{300}\x{301}
  893. A\x{300}\x{301}B\x{300}C\x{300}\x{301}X
  894. A\x{300}\x{301}B\x{300}C\x{300}\x{301}DA\x{300}X
  895. /^\X/utf
  896. A
  897. A\x{300}BC
  898. A\x{300}\x{301}\x{302}BC
  899. \x{300}
  900. /^\p{Han}+/utf
  901. \x{2e81}\x{3007}\x{2f804}\x{31a0}
  902. \= Expect no match
  903. \x{2e7f}
  904. /^[\p{Arabic}]/utf
  905. \x{06e9}
  906. \x{060b}
  907. \= Expect no match
  908. X\x{06e9}
  909. /^\P{Katakana}+/utf
  910. \x{3105}
  911. \= Expect no match
  912. \x{30ff}
  913. /^[\P{Yi}]/utf
  914. \x{2f800}
  915. \= Expect no match
  916. \x{a014}
  917. \x{a4c6}
  918. /^\p{Any}X/utf
  919. AXYZ
  920. \x{1234}XYZ
  921. \= Expect no match
  922. X
  923. /^\P{Any}X/utf
  924. \= Expect no match
  925. AX
  926. /^\p{Any}?X/utf
  927. XYZ
  928. AXYZ
  929. \x{1234}XYZ
  930. \= Expect no match
  931. ABXYZ
  932. /^\P{Any}?X/utf
  933. XYZ
  934. \= Expect no match
  935. AXYZ
  936. \x{1234}XYZ
  937. ABXYZ
  938. /^\p{Any}+X/utf
  939. AXYZ
  940. \x{1234}XYZ
  941. A\x{1234}XYZ
  942. \= Expect no match
  943. XYZ
  944. /^\P{Any}+X/utf
  945. \= Expect no match
  946. AXYZ
  947. \x{1234}XYZ
  948. A\x{1234}XYZ
  949. XYZ
  950. /^\p{Any}*X/utf
  951. XYZ
  952. AXYZ
  953. \x{1234}XYZ
  954. A\x{1234}XYZ
  955. /^\P{Any}*X/utf
  956. XYZ
  957. \= Expect no match
  958. AXYZ
  959. \x{1234}XYZ
  960. A\x{1234}XYZ
  961. /^[\p{Any}]X/utf
  962. AXYZ
  963. \x{1234}XYZ
  964. \= Expect no match
  965. X
  966. /^[\P{Any}]X/utf
  967. \= Expect no match
  968. AX
  969. /^[\p{Any}]?X/utf
  970. XYZ
  971. AXYZ
  972. \x{1234}XYZ
  973. \= Expect no match
  974. ABXYZ
  975. /^[\P{Any}]?X/utf
  976. XYZ
  977. \= Expect no match
  978. AXYZ
  979. \x{1234}XYZ
  980. ABXYZ
  981. /^[\p{Any}]+X/utf
  982. AXYZ
  983. \x{1234}XYZ
  984. A\x{1234}XYZ
  985. \= Expect no match
  986. XYZ
  987. /^[\P{Any}]+X/utf
  988. \= Expect no match
  989. AXYZ
  990. \x{1234}XYZ
  991. A\x{1234}XYZ
  992. XYZ
  993. /^[\p{Any}]*X/utf
  994. XYZ
  995. AXYZ
  996. \x{1234}XYZ
  997. A\x{1234}XYZ
  998. /^[\P{Any}]*X/utf
  999. XYZ
  1000. \= Expect no match
  1001. AXYZ
  1002. \x{1234}XYZ
  1003. A\x{1234}XYZ
  1004. /^\p{Any}{3,5}?/utf
  1005. abcdefgh
  1006. \x{1234}\n\r\x{3456}xyz
  1007. /^\p{Any}{3,5}/utf
  1008. abcdefgh
  1009. \x{1234}\n\r\x{3456}xyz
  1010. /^\P{Any}{3,5}?/utf
  1011. \= Expect no match
  1012. abcdefgh
  1013. \x{1234}\n\r\x{3456}xyz
  1014. /^\p{L&}X/utf
  1015. AXY
  1016. aXY
  1017. \x{1c5}XY
  1018. \= Expect no match
  1019. \x{1bb}XY
  1020. \x{2b0}XY
  1021. !XY
  1022. /^[\p{L&}]X/utf
  1023. AXY
  1024. aXY
  1025. \x{1c5}XY
  1026. \= Expect no match
  1027. \x{1bb}XY
  1028. \x{2b0}XY
  1029. !XY
  1030. /^\p{L&}+X/utf
  1031. AXY
  1032. aXY
  1033. AbcdeXyz
  1034. \x{1c5}AbXY
  1035. abcDEXypqreXlmn
  1036. \= Expect no match
  1037. \x{1bb}XY
  1038. \x{2b0}XY
  1039. !XY
  1040. /^[\p{L&}]+X/utf
  1041. AXY
  1042. aXY
  1043. AbcdeXyz
  1044. \x{1c5}AbXY
  1045. abcDEXypqreXlmn
  1046. \= Expect no match
  1047. \x{1bb}XY
  1048. \x{2b0}XY
  1049. !XY
  1050. /^\p{L&}+?X/utf
  1051. AXY
  1052. aXY
  1053. AbcdeXyz
  1054. \x{1c5}AbXY
  1055. abcDEXypqreXlmn
  1056. \= Expect no match
  1057. \x{1bb}XY
  1058. \x{2b0}XY
  1059. !XY
  1060. /^[\p{L&}]+?X/utf
  1061. AXY
  1062. aXY
  1063. AbcdeXyz
  1064. \x{1c5}AbXY
  1065. abcDEXypqreXlmn
  1066. \= Expect no match
  1067. \x{1bb}XY
  1068. \x{2b0}XY
  1069. !XY
  1070. /^\P{L&}X/utf
  1071. !XY
  1072. \x{1bb}XY
  1073. \x{2b0}XY
  1074. \= Expect no match
  1075. \x{1c5}XY
  1076. AXY
  1077. /^[\P{L&}]X/utf
  1078. !XY
  1079. \x{1bb}XY
  1080. \x{2b0}XY
  1081. \= Expect no match
  1082. \x{1c5}XY
  1083. AXY
  1084. /^(\p{Z}[^\p{C}\p{Z}]+)*$/
  1085. \xa0!
  1086. /^[\pL](abc)(?1)/
  1087. AabcabcYZ
  1088. /([\pL]=(abc))*X/
  1089. L=abcX
  1090. /^\p{Balinese}\p{Cuneiform}\p{Nko}\p{Phags_Pa}\p{Phoenician}/utf
  1091. \x{1b00}\x{12000}\x{7c0}\x{a840}\x{10900}
  1092. # Check property support in non-UTF mode
  1093. /\p{L}{4}/
  1094. 123abcdefg
  1095. 123abc\xc4\xc5zz
  1096. /\X{1,3}\d/
  1097. \= Expect no match
  1098. \x8aBCD
  1099. /\X?\d/
  1100. \= Expect no match
  1101. \x8aBCD
  1102. /\P{L}?\d/
  1103. \= Expect no match
  1104. \x8aBCD
  1105. /[\PPP\x8a]{1,}\x80/
  1106. A\x80
  1107. /^[\p{Arabic}]/utf
  1108. \x{604}
  1109. \x{60e}
  1110. \x{656}
  1111. \x{657}
  1112. \x{658}
  1113. \x{659}
  1114. \x{65a}
  1115. \x{65b}
  1116. \x{65c}
  1117. \x{65d}
  1118. \x{65e}
  1119. \x{65f}
  1120. \x{66a}
  1121. \x{6e9}
  1122. \x{6ef}
  1123. \x{6fa}
  1124. /^\p{Cyrillic}/utf
  1125. \x{1d2b}
  1126. /^\p{Common}/utf
  1127. \x{2116}
  1128. \x{1D183}
  1129. /^\p{Inherited}/utf
  1130. \x{200c}
  1131. \= Expect no match
  1132. \x{64a}
  1133. \x{656}
  1134. /^\p{Shavian}/utf
  1135. \x{10450}
  1136. \x{1047f}
  1137. /^\p{Deseret}/utf
  1138. \x{10400}
  1139. \x{1044f}
  1140. /^\p{Osmanya}/utf
  1141. \x{10480}
  1142. \x{1049d}
  1143. \x{104a0}
  1144. \x{104a9}
  1145. \= Expect no match
  1146. \x{1049e}
  1147. \x{1049f}
  1148. \x{104aa}
  1149. /\p{katakana}/utf
  1150. \x{30a1}
  1151. \x{3001}
  1152. /\p{scx:katakana}/utf
  1153. \x{30a1}
  1154. \x{3001}
  1155. /\p{script extensions:katakana}/utf
  1156. \x{30a1}
  1157. \x{3001}
  1158. /\p{sc:katakana}/utf
  1159. \x{30a1}
  1160. \= Expect no match
  1161. \x{3001}
  1162. /\p{script:katakana}/utf
  1163. \x{30a1}
  1164. \= Expect no match
  1165. \x{3001}
  1166. /\p{sc:katakana}{3,}/utf
  1167. \x{30a1}\x{30fa}\x{32d0}\x{1b122}\x{ff66}\x{3001}ABC
  1168. /\p{sc:katakana}{3,}?/utf
  1169. \x{30a1}\x{30fa}\x{32d0}\x{1b122}\x{ff66}\x{3001}ABC
  1170. /\p{Carian}\p{Cham}\p{Kayah_Li}\p{Lepcha}\p{Lycian}\p{Lydian}\p{Ol_Chiki}\p{Rejang}\p{Saurashtra}\p{Sundanese}\p{Vai}/utf
  1171. \x{102A4}\x{AA52}\x{A91D}\x{1C46}\x{10283}\x{1092E}\x{1C6B}\x{A93B}\x{A8BF}\x{1BA0}\x{A50A}====
  1172. /\x{a77d}\x{1d79}/i,utf
  1173. \x{a77d}\x{1d79}
  1174. \x{1d79}\x{a77d}
  1175. /\x{a77d}\x{1d79}/utf
  1176. \x{a77d}\x{1d79}
  1177. \= Expect no match
  1178. \x{1d79}\x{a77d}
  1179. /(A)\1/i,utf
  1180. AA
  1181. Aa
  1182. aa
  1183. aA
  1184. /(\x{10a})\1/i,utf
  1185. \x{10a}\x{10a}
  1186. \x{10a}\x{10b}
  1187. \x{10b}\x{10b}
  1188. \x{10b}\x{10a}
  1189. # The next two tests are for property support in non-UTF mode
  1190. /(?:\p{Lu}|\x20)+/
  1191. \x41\x20\x50\xC2\x54\xC9\x20\x54\x4F\x44\x41\x59
  1192. /[\p{Lu}\x20]+/
  1193. \x41\x20\x50\xC2\x54\xC9\x20\x54\x4F\x44\x41\x59
  1194. /\p{Avestan}\p{Bamum}\p{Egyptian_Hieroglyphs}\p{Imperial_Aramaic}\p{Inscriptional_Pahlavi}\p{Inscriptional_Parthian}\p{Javanese}\p{Kaithi}\p{Lisu}\p{Meetei_Mayek}\p{Old_South_Arabian}\p{Old_Turkic}\p{Samaritan}\p{Tai_Tham}\p{Tai_Viet}/utf
  1195. \x{10b00}\x{a6ef}\x{13007}\x{10857}\x{10b78}\x{10b58}\x{a980}\x{110c1}\x{a4ff}\x{abc0}\x{10a7d}\x{10c48}\x{0800}\x{1aad}\x{aac0}
  1196. /^\w+/utf,ucp
  1197. Az_\x{aa}\x{c0}\x{1c5}\x{2b0}\x{3b6}\x{1d7c9}\x{2fa1d}1\x{660}\x{bef}\x{16ee}
  1198. /^[[:xdigit:]]*/utf,ucp
  1199. 1a\x{660}\x{bef}\x{16ee}
  1200. /^\d+/utf,ucp
  1201. 1\x{660}\x{bef}\x{16ee}
  1202. /^[[:digit:]]+/utf,ucp
  1203. 1\x{660}\x{bef}\x{16ee}
  1204. /^>\s+/utf,ucp
  1205. >\x{20}\x{a0}\x{1680}\x{2028}\x{2029}\x{202f}\x{9}\x{b}
  1206. /^>\pZ+/utf,ucp
  1207. >\x{20}\x{a0}\x{1680}\x{2028}\x{2029}\x{202f}\x{9}\x{b}
  1208. /^>[[:space:]]*/utf,ucp
  1209. >\x{20}\x{a0}\x{1680}\x{2028}\x{2029}\x{202f}\x{9}\x{b}
  1210. /^>[[:blank:]]*/utf,ucp
  1211. >\x{20}\x{a0}\x{1680}\x{2000}\x{202f}\x{9}\x{b}\x{2028}
  1212. /^[[:alpha:]]*/utf,ucp
  1213. Az\x{aa}\x{c0}\x{1c5}\x{2b0}\x{3b6}\x{1d7c9}\x{2fa1d}
  1214. /^[[:alnum:]]*/utf,ucp
  1215. Az\x{aa}\x{c0}\x{1c5}\x{2b0}\x{3b6}\x{1d7c9}\x{2fa1d}1\x{660}\x{bef}\x{16ee}
  1216. /^[[:cntrl:]]*/utf,ucp
  1217. \x{0}\x{09}\x{1f}\x{7f}\x{9f}
  1218. /^[[:graph:]]*/utf,ucp
  1219. A\x{a1}\x{a0}
  1220. /^[[:print:]]*/utf,ucp
  1221. A z\x{a0}\x{a1}
  1222. /^[[:punct:]]*/utf,ucp
  1223. .+\x{a1}\x{a0}
  1224. /\p{Zs}*?\R/
  1225. \= Expect no match
  1226. a\xFCb
  1227. /\p{Zs}*\R/
  1228. \= Expect no match
  1229. a\xFCb
  1230. /ⱥ/i,utf
  1231. Ⱥx
  1232. Ⱥ
  1233. /[ⱥ]/i,utf
  1234. Ⱥx
  1235. Ⱥ
  1236. /Ⱥ/i,utf
  1237. Ⱥ
  1238. # These are tests for extended grapheme clusters
  1239. /^\X/utf,aftertext
  1240. G\x{34e}\x{34e}X
  1241. \x{34e}\x{34e}X
  1242. \x04X
  1243. \x{1100}X
  1244. \x{1100}\x{34e}X
  1245. \x{1b04}\x{1b04}X
  1246. *These match up to the roman letters
  1247. \x{1111}\x{1111}L,L
  1248. \x{1111}\x{1111}\x{1169}L,L,V
  1249. \x{1111}\x{ae4c}L, LV
  1250. \x{1111}\x{ad89}L, LVT
  1251. \x{1111}\x{ae4c}\x{1169}L, LV, V
  1252. \x{1111}\x{ae4c}\x{1169}\x{1169}L, LV, V, V
  1253. \x{1111}\x{ae4c}\x{1169}\x{11fe}L, LV, V, T
  1254. \x{1111}\x{ad89}\x{11fe}L, LVT, T
  1255. \x{1111}\x{ad89}\x{11fe}\x{11fe}L, LVT, T, T
  1256. \x{ad89}\x{11fe}\x{11fe}LVT, T, T
  1257. *These match just the first codepoint (invalid sequence)
  1258. \x{1111}\x{11fe}L, T
  1259. \x{ae4c}\x{1111}LV, L
  1260. \x{ae4c}\x{ae4c}LV, LV
  1261. \x{ae4c}\x{ad89}LV, LVT
  1262. \x{1169}\x{1111}V, L
  1263. \x{1169}\x{ae4c}V, LV
  1264. \x{1169}\x{ad89}V, LVT
  1265. \x{ad89}\x{1111}LVT, L
  1266. \x{ad89}\x{1169}LVT, V
  1267. \x{ad89}\x{ae4c}LVT, LV
  1268. \x{ad89}\x{ad89}LVT, LVT
  1269. \x{11fe}\x{1111}T, L
  1270. \x{11fe}\x{1169}T, V
  1271. \x{11fe}\x{ae4c}T, LV
  1272. \x{11fe}\x{ad89}T, LVT
  1273. *Test extend and spacing mark
  1274. \x{1111}\x{ae4c}\x{0711}L, LV, extend
  1275. \x{1111}\x{ae4c}\x{1b04}L, LV, spacing mark
  1276. \x{1111}\x{ae4c}\x{1b04}\x{0711}\x{1b04}L, LV, spacing mark, extend, spacing mark
  1277. *Test CR, LF, and control
  1278. \x0d\x{0711}CR, extend
  1279. \x0d\x{1b04}CR, spacingmark
  1280. \x0a\x{0711}LF, extend
  1281. \x0a\x{1b04}LF, spacingmark
  1282. \x0b\x{0711}Control, extend
  1283. \x09\x{1b04}Control, spacingmark
  1284. *Test Extended Pictographic after bug fix
  1285. \x{261d}\x{261d}B Extended_Pictographic Extended_Pictographic
  1286. \x{261D}\x{1F3FB}\x{261d}B Extended_Pictographic Extend E-P
  1287. \x{261D}\x{1F3FB}\x{200d}\x{261d}B Extended_Pictographic Extend ZWJ E-P
  1288. \x{1f3f3}\x{fe0f}\x{200d}\x{1f308}\x{1f3f4}\x{200d}\x{2620}\x{fe0f}\x{1f3f3}\x{fe0f}\x{200d}\x{1f308}\x{1f3f4}\x{200d}\x{2620}\x{fe0f}
  1289. A\x{200d}\x{1f308}B
  1290. A\x{200d}B A ZWJ
  1291. \x{261D}\x{1F3FB}B Extended_Pictographic Extend
  1292. \x{1F1E6}\x{1F1E7}B RegionalIndicator RegionalIndicator
  1293. *There are no Prepend characters, so we can't test Prepend, CR
  1294. /^(?>\X{2})X/utf,aftertext
  1295. \x{1111}\x{ae4c}\x{1111}\x{ae4c}X
  1296. /^\X{2,4}X/utf,aftertext
  1297. \x{1111}\x{ae4c}\x{1111}\x{ae4c}X
  1298. \x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}X
  1299. \x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}X
  1300. /^\X{2,4}?X/utf,aftertext
  1301. \x{1111}\x{ae4c}\x{1111}\x{ae4c}X
  1302. \x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}X
  1303. \x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}X
  1304. /\X*Z/utf,no_start_optimize
  1305. \= Expect no match
  1306. A\x{300}
  1307. /\X*(.)/utf,no_start_optimize
  1308. A\x{1111}\x{ae4c}\x{1169}
  1309. # --------------------------------------------
  1310. /\x{1e9e}+/i,utf
  1311. \x{1e9e}\x{00df}
  1312. /[z\x{1e9e}]+/i,utf
  1313. \x{1e9e}\x{00df}
  1314. /\x{00df}+/i,utf
  1315. \x{1e9e}\x{00df}
  1316. /[z\x{00df}]+/i,utf
  1317. \x{1e9e}\x{00df}
  1318. /\x{1f88}+/i,utf
  1319. \x{1f88}\x{1f80}
  1320. /[z\x{1f88}]+/i,utf
  1321. \x{1f88}\x{1f80}
  1322. # Check a reference with more than one other case
  1323. /^(\x{00b5})\1{2}$/i,utf
  1324. \x{00b5}\x{039c}\x{03bc}
  1325. # Characters with more than one other case; test in classes
  1326. /[z\x{00b5}]+/i,utf
  1327. \x{00b5}\x{039c}\x{03bc}
  1328. /[z\x{039c}]+/i,utf
  1329. \x{00b5}\x{039c}\x{03bc}
  1330. /[z\x{03bc}]+/i,utf
  1331. \x{00b5}\x{039c}\x{03bc}
  1332. /[z\x{00c5}]+/i,utf
  1333. \x{00c5}\x{00e5}\x{212b}
  1334. /[z\x{00e5}]+/i,utf
  1335. \x{00c5}\x{00e5}\x{212b}
  1336. /[z\x{212b}]+/i,utf
  1337. \x{00c5}\x{00e5}\x{212b}
  1338. /[z\x{01c4}]+/i,utf
  1339. \x{01c4}\x{01c5}\x{01c6}
  1340. /[z\x{01c5}]+/i,utf
  1341. \x{01c4}\x{01c5}\x{01c6}
  1342. /[z\x{01c6}]+/i,utf
  1343. \x{01c4}\x{01c5}\x{01c6}
  1344. /[z\x{01c7}]+/i,utf
  1345. \x{01c7}\x{01c8}\x{01c9}
  1346. /[z\x{01c8}]+/i,utf
  1347. \x{01c7}\x{01c8}\x{01c9}
  1348. /[z\x{01c9}]+/i,utf
  1349. \x{01c7}\x{01c8}\x{01c9}
  1350. /[z\x{01ca}]+/i,utf
  1351. \x{01ca}\x{01cb}\x{01cc}
  1352. /[z\x{01cb}]+/i,utf
  1353. \x{01ca}\x{01cb}\x{01cc}
  1354. /[z\x{01cc}]+/i,utf
  1355. \x{01ca}\x{01cb}\x{01cc}
  1356. /[z\x{01f1}]+/i,utf
  1357. \x{01f1}\x{01f2}\x{01f3}
  1358. /[z\x{01f2}]+/i,utf
  1359. \x{01f1}\x{01f2}\x{01f3}
  1360. /[z\x{01f3}]+/i,utf
  1361. \x{01f1}\x{01f2}\x{01f3}
  1362. /[z\x{0345}]+/i,utf
  1363. \x{0345}\x{0399}\x{03b9}\x{1fbe}
  1364. /[z\x{0399}]+/i,utf
  1365. \x{0345}\x{0399}\x{03b9}\x{1fbe}
  1366. /[z\x{03b9}]+/i,utf
  1367. \x{0345}\x{0399}\x{03b9}\x{1fbe}
  1368. /[z\x{1fbe}]+/i,utf
  1369. \x{0345}\x{0399}\x{03b9}\x{1fbe}
  1370. /[z\x{0392}]+/i,utf
  1371. \x{0392}\x{03b2}\x{03d0}
  1372. /[z\x{03b2}]+/i,utf
  1373. \x{0392}\x{03b2}\x{03d0}
  1374. /[z\x{03d0}]+/i,utf
  1375. \x{0392}\x{03b2}\x{03d0}
  1376. /[z\x{0395}]+/i,utf
  1377. \x{0395}\x{03b5}\x{03f5}
  1378. /[z\x{03b5}]+/i,utf
  1379. \x{0395}\x{03b5}\x{03f5}
  1380. /[z\x{03f5}]+/i,utf
  1381. \x{0395}\x{03b5}\x{03f5}
  1382. /[z\x{0398}]+/i,utf
  1383. \x{0398}\x{03b8}\x{03d1}\x{03f4}
  1384. /[z\x{03b8}]+/i,utf
  1385. \x{0398}\x{03b8}\x{03d1}\x{03f4}
  1386. /[z\x{03d1}]+/i,utf
  1387. \x{0398}\x{03b8}\x{03d1}\x{03f4}
  1388. /[z\x{03f4}]+/i,utf
  1389. \x{0398}\x{03b8}\x{03d1}\x{03f4}
  1390. /[z\x{039a}]+/i,utf
  1391. \x{039a}\x{03ba}\x{03f0}
  1392. /[z\x{03ba}]+/i,utf
  1393. \x{039a}\x{03ba}\x{03f0}
  1394. /[z\x{03f0}]+/i,utf
  1395. \x{039a}\x{03ba}\x{03f0}
  1396. /[z\x{03a0}]+/i,utf
  1397. \x{03a0}\x{03c0}\x{03d6}
  1398. /[z\x{03c0}]+/i,utf
  1399. \x{03a0}\x{03c0}\x{03d6}
  1400. /[z\x{03d6}]+/i,utf
  1401. \x{03a0}\x{03c0}\x{03d6}
  1402. /[z\x{03a1}]+/i,utf
  1403. \x{03a1}\x{03c1}\x{03f1}
  1404. /[z\x{03c1}]+/i,utf
  1405. \x{03a1}\x{03c1}\x{03f1}
  1406. /[z\x{03f1}]+/i,utf
  1407. \x{03a1}\x{03c1}\x{03f1}
  1408. /[z\x{03a3}]+/i,utf
  1409. \x{03A3}\x{03C2}\x{03C3}
  1410. /[z\x{03c2}]+/i,utf
  1411. \x{03A3}\x{03C2}\x{03C3}
  1412. /[z\x{03c3}]+/i,utf
  1413. \x{03A3}\x{03C2}\x{03C3}
  1414. /[z\x{03a6}]+/i,utf
  1415. \x{03a6}\x{03c6}\x{03d5}
  1416. /[z\x{03c6}]+/i,utf
  1417. \x{03a6}\x{03c6}\x{03d5}
  1418. /[z\x{03d5}]+/i,utf
  1419. \x{03a6}\x{03c6}\x{03d5}
  1420. /[z\x{03c9}]+/i,utf
  1421. \x{03c9}\x{03a9}\x{2126}
  1422. /[z\x{03a9}]+/i,utf
  1423. \x{03c9}\x{03a9}\x{2126}
  1424. /[z\x{2126}]+/i,utf
  1425. \x{03c9}\x{03a9}\x{2126}
  1426. /[z\x{1e60}]+/i,utf
  1427. \x{1e60}\x{1e61}\x{1e9b}
  1428. /[z\x{1e61}]+/i,utf
  1429. \x{1e60}\x{1e61}\x{1e9b}
  1430. /[z\x{1e9b}]+/i,utf
  1431. \x{1e60}\x{1e61}\x{1e9b}
  1432. # Perl 5.12.4 gets these wrong, but 5.15.3 is OK
  1433. /[z\x{004b}]+/i,utf
  1434. \x{004b}\x{006b}\x{212a}
  1435. /[z\x{006b}]+/i,utf
  1436. \x{004b}\x{006b}\x{212a}
  1437. /[z\x{212a}]+/i,utf
  1438. \x{004b}\x{006b}\x{212a}
  1439. /[z\x{0053}]+/i,utf
  1440. \x{0053}\x{0073}\x{017f}
  1441. /[z\x{0073}]+/i,utf
  1442. \x{0053}\x{0073}\x{017f}
  1443. /[z\x{017f}]+/i,utf
  1444. \x{0053}\x{0073}\x{017f}
  1445. # --------------------------------------
  1446. /(ΣΆΜΟΣ) \1/i,utf
  1447. ΣΆΜΟΣ ΣΆΜΟΣ
  1448. ΣΆΜΟΣ σάμος
  1449. σάμος σάμος
  1450. σάμος σάμοσ
  1451. σάμος ΣΆΜΟΣ
  1452. /(σάμος) \1/i,utf
  1453. ΣΆΜΟΣ ΣΆΜΟΣ
  1454. ΣΆΜΟΣ σάμος
  1455. σάμος σάμος
  1456. σάμος σάμοσ
  1457. σάμος ΣΆΜΟΣ
  1458. /(ΣΆΜΟΣ) \1*/i,utf
  1459. ΣΆΜΟΣ\x20
  1460. ΣΆΜΟΣ ΣΆΜΟΣσάμοςσάμος
  1461. # Perl matches these
  1462. /\x{00b5}+/i,utf
  1463. \x{00b5}\x{039c}\x{03bc}
  1464. /\x{039c}+/i,utf
  1465. \x{00b5}\x{039c}\x{03bc}
  1466. /\x{03bc}+/i,utf
  1467. \x{00b5}\x{039c}\x{03bc}
  1468. /\x{00c5}+/i,utf
  1469. \x{00c5}\x{00e5}\x{212b}
  1470. /\x{00e5}+/i,utf
  1471. \x{00c5}\x{00e5}\x{212b}
  1472. /\x{212b}+/i,utf
  1473. \x{00c5}\x{00e5}\x{212b}
  1474. /\x{01c4}+/i,utf
  1475. \x{01c4}\x{01c5}\x{01c6}
  1476. /\x{01c5}+/i,utf
  1477. \x{01c4}\x{01c5}\x{01c6}
  1478. /\x{01c6}+/i,utf
  1479. \x{01c4}\x{01c5}\x{01c6}
  1480. /\x{01c7}+/i,utf
  1481. \x{01c7}\x{01c8}\x{01c9}
  1482. /\x{01c8}+/i,utf
  1483. \x{01c7}\x{01c8}\x{01c9}
  1484. /\x{01c9}+/i,utf
  1485. \x{01c7}\x{01c8}\x{01c9}
  1486. /\x{01ca}+/i,utf
  1487. \x{01ca}\x{01cb}\x{01cc}
  1488. /\x{01cb}+/i,utf
  1489. \x{01ca}\x{01cb}\x{01cc}
  1490. /\x{01cc}+/i,utf
  1491. \x{01ca}\x{01cb}\x{01cc}
  1492. /\x{01f1}+/i,utf
  1493. \x{01f1}\x{01f2}\x{01f3}
  1494. /\x{01f2}+/i,utf
  1495. \x{01f1}\x{01f2}\x{01f3}
  1496. /\x{01f3}+/i,utf
  1497. \x{01f1}\x{01f2}\x{01f3}
  1498. /\x{0345}+/i,utf
  1499. \x{0345}\x{0399}\x{03b9}\x{1fbe}
  1500. /\x{0399}+/i,utf
  1501. \x{0345}\x{0399}\x{03b9}\x{1fbe}
  1502. /\x{03b9}+/i,utf
  1503. \x{0345}\x{0399}\x{03b9}\x{1fbe}
  1504. /\x{1fbe}+/i,utf
  1505. \x{0345}\x{0399}\x{03b9}\x{1fbe}
  1506. /\x{0392}+/i,utf
  1507. \x{0392}\x{03b2}\x{03d0}
  1508. /\x{03b2}+/i,utf
  1509. \x{0392}\x{03b2}\x{03d0}
  1510. /\x{03d0}+/i,utf
  1511. \x{0392}\x{03b2}\x{03d0}
  1512. /\x{0395}+/i,utf
  1513. \x{0395}\x{03b5}\x{03f5}
  1514. /\x{03b5}+/i,utf
  1515. \x{0395}\x{03b5}\x{03f5}
  1516. /\x{03f5}+/i,utf
  1517. \x{0395}\x{03b5}\x{03f5}
  1518. /\x{0398}+/i,utf
  1519. \x{0398}\x{03b8}\x{03d1}\x{03f4}
  1520. /\x{03b8}+/i,utf
  1521. \x{0398}\x{03b8}\x{03d1}\x{03f4}
  1522. /\x{03d1}+/i,utf
  1523. \x{0398}\x{03b8}\x{03d1}\x{03f4}
  1524. /\x{03f4}+/i,utf
  1525. \x{0398}\x{03b8}\x{03d1}\x{03f4}
  1526. /\x{039a}+/i,utf
  1527. \x{039a}\x{03ba}\x{03f0}
  1528. /\x{03ba}+/i,utf
  1529. \x{039a}\x{03ba}\x{03f0}
  1530. /\x{03f0}+/i,utf
  1531. \x{039a}\x{03ba}\x{03f0}
  1532. /\x{03a0}+/i,utf
  1533. \x{03a0}\x{03c0}\x{03d6}
  1534. /\x{03c0}+/i,utf
  1535. \x{03a0}\x{03c0}\x{03d6}
  1536. /\x{03d6}+/i,utf
  1537. \x{03a0}\x{03c0}\x{03d6}
  1538. /\x{03a1}+/i,utf
  1539. \x{03a1}\x{03c1}\x{03f1}
  1540. /\x{03c1}+/i,utf
  1541. \x{03a1}\x{03c1}\x{03f1}
  1542. /\x{03f1}+/i,utf
  1543. \x{03a1}\x{03c1}\x{03f1}
  1544. /\x{03a3}+/i,utf
  1545. \x{03A3}\x{03C2}\x{03C3}
  1546. /\x{03c2}+/i,utf
  1547. \x{03A3}\x{03C2}\x{03C3}
  1548. /\x{03c3}+/i,utf
  1549. \x{03A3}\x{03C2}\x{03C3}
  1550. /\x{03a6}+/i,utf
  1551. \x{03a6}\x{03c6}\x{03d5}
  1552. /\x{03c6}+/i,utf
  1553. \x{03a6}\x{03c6}\x{03d5}
  1554. /\x{03d5}+/i,utf
  1555. \x{03a6}\x{03c6}\x{03d5}
  1556. /\x{03c9}+/i,utf
  1557. \x{03c9}\x{03a9}\x{2126}
  1558. /\x{03a9}+/i,utf
  1559. \x{03c9}\x{03a9}\x{2126}
  1560. /\x{2126}+/i,utf
  1561. \x{03c9}\x{03a9}\x{2126}
  1562. /\x{1e60}+/i,utf
  1563. \x{1e60}\x{1e61}\x{1e9b}
  1564. /\x{1e61}+/i,utf
  1565. \x{1e60}\x{1e61}\x{1e9b}
  1566. /\x{1e9b}+/i,utf
  1567. \x{1e60}\x{1e61}\x{1e9b}
  1568. /\x{1e9e}+/i,utf
  1569. \x{1e9e}\x{00df}
  1570. /\x{00df}+/i,utf
  1571. \x{1e9e}\x{00df}
  1572. /\x{1f88}+/i,utf
  1573. \x{1f88}\x{1f80}
  1574. /\x{1f80}+/i,utf
  1575. \x{1f88}\x{1f80}
  1576. # Perl 5.12.4 gets these wrong, but 5.15.3 is OK
  1577. /\x{004b}+/i,utf
  1578. \x{004b}\x{006b}\x{212a}
  1579. /\x{006b}+/i,utf
  1580. \x{004b}\x{006b}\x{212a}
  1581. /\x{212a}+/i,utf
  1582. \x{004b}\x{006b}\x{212a}
  1583. /\x{0053}+/i,utf
  1584. \x{0053}\x{0073}\x{017f}
  1585. /\x{0073}+/i,utf
  1586. \x{0053}\x{0073}\x{017f}
  1587. /\x{017f}+/i,utf
  1588. \x{0053}\x{0073}\x{017f}
  1589. /^\p{Any}*\d{4}/utf
  1590. 1234
  1591. \= Expect no match
  1592. 123
  1593. /^\X*\w{4}/utf
  1594. 1234
  1595. \= Expect no match
  1596. 123
  1597. /^A\s+Z/utf,ucp
  1598. A\x{2005}Z
  1599. A\x{85}\x{2005}Z
  1600. /^A[\s]+Z/utf,ucp
  1601. A\x{2005}Z
  1602. A\x{85}\x{2005}Z
  1603. /^[[:graph:]]+$/utf,ucp
  1604. Letter:ABC
  1605. Mark:\x{300}\x{1d172}\x{1d17b}
  1606. Number:9\x{660}
  1607. Punctuation:\x{66a},;
  1608. Symbol:\x{6de}<>\x{fffc}
  1609. Cf-property:\x{ad}\x{600}\x{601}\x{602}\x{603}\x{604}\x{6dd}\x{70f}
  1610. \x{200b}\x{200c}\x{200d}\x{200e}\x{200f}
  1611. \x{202a}\x{202b}\x{202c}\x{202d}\x{202e}
  1612. \x{2060}\x{2061}\x{2062}\x{2063}\x{2064}
  1613. \x{206a}\x{206b}\x{206c}\x{206d}\x{206e}\x{206f}
  1614. \x{feff}
  1615. \x{fff9}\x{fffa}\x{fffb}
  1616. \x{110bd}
  1617. \x{1d173}\x{1d174}\x{1d175}\x{1d176}\x{1d177}\x{1d178}\x{1d179}\x{1d17a}
  1618. \x{e0001}
  1619. \x{e0020}\x{e0030}\x{e0040}\x{e0050}\x{e0060}\x{e0070}\x{e007f}
  1620. \= Expect no match
  1621. \x{09}
  1622. \x{0a}
  1623. \x{1D}
  1624. \x{20}
  1625. \x{85}
  1626. \x{a0}
  1627. \x{1680}
  1628. \x{2028}
  1629. \x{2029}
  1630. \x{202f}
  1631. \x{2065}
  1632. \x{3000}
  1633. \x{e0002}
  1634. \x{e001f}
  1635. \x{e0080}
  1636. /^[[:print:]]+$/utf,ucp
  1637. Space: \x{a0}
  1638. \x{1680}\x{2000}\x{2001}\x{2002}\x{2003}\x{2004}\x{2005}
  1639. \x{2006}\x{2007}\x{2008}\x{2009}\x{200a}
  1640. \x{202f}\x{205f}
  1641. \x{3000}
  1642. Letter:ABC
  1643. Mark:\x{300}\x{1d172}\x{1d17b}
  1644. Number:9\x{660}
  1645. Punctuation:\x{66a},;
  1646. Symbol:\x{6de}<>\x{fffc}
  1647. Cf-property:\x{ad}\x{600}\x{601}\x{602}\x{603}\x{604}\x{6dd}\x{70f}
  1648. \x{200b}\x{200c}\x{200d}\x{200e}\x{200f}
  1649. \x{202a}\x{202b}\x{202c}\x{202d}\x{202e}
  1650. \x{202f}
  1651. \x{2060}\x{2061}\x{2062}\x{2063}\x{2064}
  1652. \x{206a}\x{206b}\x{206c}\x{206d}\x{206e}\x{206f}
  1653. \x{feff}
  1654. \x{fff9}\x{fffa}\x{fffb}
  1655. \x{110bd}
  1656. \x{1d173}\x{1d174}\x{1d175}\x{1d176}\x{1d177}\x{1d178}\x{1d179}\x{1d17a}
  1657. \x{e0001}
  1658. \x{e0020}\x{e0030}\x{e0040}\x{e0050}\x{e0060}\x{e0070}\x{e007f}
  1659. \= Expect no match
  1660. \x{09}
  1661. \x{1D}
  1662. \x{85}
  1663. \x{2028}
  1664. \x{2029}
  1665. \x{2065}
  1666. \x{e0002}
  1667. \x{e001f}
  1668. \x{e0080}
  1669. /^[[:punct:]]+$/utf,ucp
  1670. \$+<=>^`|~
  1671. !\"#%&'()*,-./:;?@[\\]_{}
  1672. \x{a1}\x{a7}
  1673. \x{37e}
  1674. \= Expect no match
  1675. abcde
  1676. /^[[:^graph:]]+$/utf,ucp
  1677. \x{09}\x{0a}\x{1D}\x{20}\x{85}\x{a0}\x{1680}
  1678. \x{2028}\x{2029}\x{202f}\x{2065}
  1679. \x{3000}\x{e0002}\x{e001f}\x{e0080}
  1680. \= Expect no match
  1681. Letter:ABC
  1682. Mark:\x{300}\x{1d172}\x{1d17b}
  1683. Number:9\x{660}
  1684. Punctuation:\x{66a},;
  1685. Symbol:\x{6de}<>\x{fffc}
  1686. Cf-property:\x{ad}\x{600}\x{601}\x{602}\x{603}\x{604}\x{6dd}\x{70f}
  1687. \x{200b}\x{200c}\x{200d}\x{200e}\x{200f}
  1688. \x{202a}\x{202b}\x{202c}\x{202d}\x{202e}
  1689. \x{2060}\x{2061}\x{2062}\x{2063}\x{2064}
  1690. \x{206a}\x{206b}\x{206c}\x{206d}\x{206e}\x{206f}
  1691. \x{feff}
  1692. \x{fff9}\x{fffa}\x{fffb}
  1693. \x{110bd}
  1694. \x{1d173}\x{1d174}\x{1d175}\x{1d176}\x{1d177}\x{1d178}\x{1d179}\x{1d17a}
  1695. \x{e0001}
  1696. \x{e0020}\x{e0030}\x{e0040}\x{e0050}\x{e0060}\x{e0070}\x{e007f}
  1697. /^[[:^print:]]+$/utf,ucp
  1698. \x{09}\x{1D}\x{85}\x{2028}\x{2029}\x{2065}
  1699. \x{e0002}\x{e001f}\x{e0080}
  1700. \= Expect no match
  1701. Space: \x{a0}
  1702. \x{1680}\x{2000}\x{2001}\x{2002}\x{2003}\x{2004}\x{2005}
  1703. \x{2006}\x{2007}\x{2008}\x{2009}\x{200a}
  1704. \x{202f}\x{205f}
  1705. \x{3000}
  1706. Letter:ABC
  1707. Mark:\x{300}\x{1d172}\x{1d17b}
  1708. Number:9\x{660}
  1709. Punctuation:\x{66a},;
  1710. Symbol:\x{6de}<>\x{fffc}
  1711. Cf-property:\x{ad}\x{600}\x{601}\x{602}\x{603}\x{604}\x{6dd}\x{70f}
  1712. \x{200b}\x{200c}\x{200d}\x{200e}\x{200f}
  1713. \x{202a}\x{202b}\x{202c}\x{202d}\x{202e}
  1714. \x{202f}
  1715. \x{2060}\x{2061}\x{2062}\x{2063}\x{2064}
  1716. \x{206a}\x{206b}\x{206c}\x{206d}\x{206e}\x{206f}
  1717. \x{feff}
  1718. \x{fff9}\x{fffa}\x{fffb}
  1719. \x{110bd}
  1720. \x{1d173}\x{1d174}\x{1d175}\x{1d176}\x{1d177}\x{1d178}\x{1d179}\x{1d17a}
  1721. \x{e0001}
  1722. \x{e0020}\x{e0030}\x{e0040}\x{e0050}\x{e0060}\x{e0070}\x{e007f}
  1723. /^[[:^punct:]]+$/utf,ucp
  1724. abcde
  1725. \= Expect no match
  1726. \$+<=>^`|~
  1727. !\"#%&'()*,-./:;?@[\\]_{}
  1728. \x{a1}\x{a7}
  1729. \x{37e}
  1730. /[RST]+/i,utf,ucp
  1731. Ss\x{17f}
  1732. /[R-T]+/i,utf,ucp
  1733. Ss\x{17f}
  1734. /[q-u]+/i,utf,ucp
  1735. Ss\x{17f}
  1736. /^s?c/im,utf
  1737. scat
  1738. # The next four tests are for repeated caseless back references when the
  1739. # code unit length of the matched text is different to that of the original
  1740. # group in the UTF-8 case.
  1741. /^(\x{23a})\1*(.)/i,utf
  1742. \x{23a}\x{23a}\x{23a}\x{23a}
  1743. \x{23a}\x{2c65}\x{2c65}\x{2c65}
  1744. \x{23a}\x{23a}\x{2c65}\x{23a}
  1745. /^(\x{23a})\1*(..)/i,utf
  1746. \x{23a}\x{2c65}\x{2c65}\x{2c65}
  1747. \x{23a}\x{23a}\x{2c65}\x{23a}
  1748. /^(\x{23a})\1*(...)/i,utf
  1749. \x{23a}\x{2c65}\x{2c65}\x{2c65}
  1750. \x{23a}\x{23a}\x{2c65}\x{23a}
  1751. /^(\x{23a})\1*(....)/i,utf
  1752. \= Expect no match
  1753. \x{23a}\x{2c65}\x{2c65}\x{2c65}
  1754. \x{23a}\x{23a}\x{2c65}\x{23a}
  1755. /[A-`]/i,utf
  1756. abcdefghijklmno
  1757. /[\S\V\H]/utf
  1758. /[^\p{Any}]*+x/utf
  1759. x
  1760. /[[:punct:]]/utf,ucp
  1761. \x{b4}
  1762. /[[:^ascii:]]/utf,ucp
  1763. \x{100}
  1764. \x{200}
  1765. \x{300}
  1766. \x{37e}
  1767. \= Expect no match
  1768. aa
  1769. 99
  1770. /[[:^ascii:]\w]/utf,ucp
  1771. aa
  1772. 99
  1773. gg
  1774. \x{100}
  1775. \x{200}
  1776. \x{300}
  1777. \x{37e}
  1778. /[\w[:^ascii:]]/utf,ucp
  1779. aa
  1780. 99
  1781. gg
  1782. \x{100}
  1783. \x{200}
  1784. \x{300}
  1785. \x{37e}
  1786. /[^[:ascii:]\W]/utf,ucp
  1787. \x{100}
  1788. \x{200}
  1789. \= Expect no match
  1790. aa
  1791. 99
  1792. gg
  1793. \x{37e}
  1794. /[^[:^ascii:]\d]/utf,ucp
  1795. a
  1796. ~
  1797. \a
  1798. \x{7f}
  1799. \= Expect no match
  1800. 0
  1801. \x{389}
  1802. \x{20ac}
  1803. /(?=.*b)\pL/
  1804. 11bb
  1805. /(?(?=.*b)(?=.*b)\pL|.*c)/
  1806. 11bb
  1807. /^\x{123}+?$/utf,no_auto_possess
  1808. \x{123}\x{123}\x{123}
  1809. /^\x{123}+?$/i,utf,no_auto_possess
  1810. \x{123}\x{122}\x{123}
  1811. \= Expect no match
  1812. \x{123}\x{124}\x{123}
  1813. /\N{U+1234}/utf
  1814. \x{1234}
  1815. /[\N{U+1234}]/utf
  1816. \x{1234}
  1817. # Test the full list of Unicode "Pattern White Space" characters that are to
  1818. # be ignored by /x. The pattern lines below may show up oddly in text editors
  1819. # or when listed to the screen. Note that characters such as U+2002, which are
  1820. # matched as space by \h and \v are *not* "Pattern White Space".
  1821. /A…‎‏

B/x,utf
  1822. AB
  1823. /A B/x,utf
  1824. A\x{2002}B
  1825. \= Expect no match
  1826. AB
  1827. # -------
  1828. /[^\x{100}-\x{ffff}]*[\x80-\xff]/utf
  1829. \x{99}\x{99}\x{99}
  1830. /[^\x{100}-\x{ffff}ABC]*[\x80-\xff]/utf
  1831. \x{99}\x{99}\x{99}
  1832. /[^\x{100}-\x{ffff}]*[\x80-\xff]/i,utf
  1833. \x{99}\x{99}\x{99}
  1834. # Script run tests
  1835. /^(*script_run:.{4})/utf
  1836. abcd Latin x4
  1837. \x{2e80}\x{2fa1d}\x{3041}\x{30a1} Han Han Hiragana Katakana
  1838. \x{3041}\x{30a1}\x{3007}\x{3007} Hiragana Katakana Han Han
  1839. \x{30a1}\x{3041}\x{3007}\x{3007} Katakana Hiragana Han Han
  1840. \x{1100}\x{2e80}\x{2e80}\x{1101} Hangul Han Han Hangul
  1841. \x{2e80}\x{3105}\x{2e80}\x{3105} Han Bopomofo Han Bopomofo
  1842. \x{02ea}\x{2e80}\x{2e80}\x{3105} Bopomofo-Sk Han Han Bopomofo
  1843. \x{3105}\x{2e80}\x{2e80}\x{3105} Bopomofo Han Han Bopomofo
  1844. \x{0300}cd! Inherited Latin Latin Common
  1845. \x{0391}12\x{03a9} Greek Common-digits Greek
  1846. \x{0400}12\x{fe2f} Cyrillic Common-digits Cyrillic
  1847. \x{0531}12\x{fb17} Armenian Common-digits Armenian
  1848. \x{0591}12\x{fb4f} Hebrew Common-digits Hebrew
  1849. \x{0600}12\x{1eef1} Arabic Common-digits Arabic
  1850. \x{0600}\x{0660}\x{0669}\x{1eef1} Arabic Arabic-digits Arabic
  1851. \x{0700}12\x{086a} Syriac Common-digits Syriac
  1852. \x{1200}12\x{ab2e} Ethiopic Common-digits Ethiopic
  1853. \x{1680}12\x{169c} Ogham Common-digits Ogham
  1854. \x{3041}12\x{3041} Hiragana Common-digits Hiragana
  1855. \x{0980}\x{09e6}\x{09e7}\x{0993} Bengali Bengali-digits Bengali
  1856. !cde Common Latin Latin Latin
  1857. A..B Latin Common Common Latin
  1858. 0abc Ascii-digit Latin Latin Latin
  1859. 1\x{0700}\x{0700}\x{0700} Ascii-digit Syriac x 3
  1860. \x{1A80}\x{1A80}\x{1a40}\x{1a41} Tai Tham Hora digits, letters
  1861. \= Expect no match
  1862. a\x{370}bcd Latin Greek Latin Latin
  1863. \x{1100}\x{02ea}\x{02ea}\x{02ea} Hangul Bopomofo x3
  1864. \x{02ea}\x{02ea}\x{02ea}\x{1100} Bopomofo x3 Hangul
  1865. \x{1100}\x{2e80}\x{3041}\x{1101} Hangul Han Hiragana Hangul
  1866. \x{0391}\x{09e6}\x{09e7}\x{03a9} Greek Bengali digits Greek
  1867. \x{0600}7\x{0669}\x{1eef1} Arabic ascii-digit Arabic-digit Arabic
  1868. \x{0600}\x{0669}7\x{1eef1} Arabic Arabic-digit ascii-digit Arabic
  1869. A5\x{ff19}B Latin Common-ascii/notascii-digits Latin
  1870. \x{0300}cd\x{0391} Inherited Latin Latin Greek
  1871. !cd\x{0391} Common Latin Latin Greek
  1872. \x{1A80}\x{1A90}\x{1a40}\x{1a41} Tai Tham Hora digit, Tham digit, letters
  1873. A\x{1d7ce}\x{1d7ff}B Common fancy-common-2-sets-digits Common
  1874. \x{2e80}\x{3105}\x{2e80}\x{30a1} Han Bopomofo Han Katakana
  1875. /^(*sr:.{4}|..)/utf
  1876. \x{2e80}\x{3105}\x{2e80}\x{30a1} Han Bopomofo Han Katakana
  1877. /^(*atomic_script_run:.{4}|..)/utf
  1878. \= Expect no match
  1879. \x{2e80}\x{3105}\x{2e80}\x{30a1} Han Bopomofo Han Katakana
  1880. /^(*asr:.*)/utf
  1881. \= Expect no match
  1882. \x{2e80}\x{3105}\x{2e80}\x{30a1} Han Bopomofo Han Katakana
  1883. /^(?>(*sr:.*))/utf
  1884. \x{2e80}\x{3105}\x{2e80}\x{30a1} Han Bopomofo Han Katakana
  1885. /^(*sr:.*)/utf
  1886. \x{2e80}\x{3105}\x{2e80}\x{30a1} Han Bopomofo Han Katakana
  1887. \x{10fffd}\x{10fffd}\x{10fffd} Private use (Unknown)
  1888. /^(*sr:\x{2e80}*)/utf
  1889. \x{2e80}\x{2e80}\x{3105} Han Han Bopomofo
  1890. /^(*sr:\x{2e80}*)\x{2e80}/utf
  1891. \x{2e80}\x{2e80}\x{3105} Han Han Bopomofo
  1892. /^(*sr:.*)Test/utf
  1893. Test script run on an empty string
  1894. /^(*sr:(.{2})){2}/utf
  1895. \x{0600}7\x{0669}\x{1eef1} Arabic ascii-digit Arabic-digit Arabic
  1896. \x{1A80}\x{1A80}\x{1a40}\x{1a41} Tai Tham Hora digits, letters
  1897. \x{1A80}\x{1a40}\x{1A90}\x{1a41} Tai Tham Hora digit, letter, Tham digit, letter
  1898. \= Expect no match
  1899. \x{1100}\x{2e80}\x{3041}\x{1101} Hangul Han Hiragana Hangul
  1900. /^(*sr:\S*)/utf
  1901. \x{1cf4}\x{20f0}\x{900}\x{11305} [Dev,Gran,Kan] [Dev,Gran,Lat] Dev Gran
  1902. \x{1cf4}\x{20f0}\x{11305}\x{900} [Dev,Gran,Kan] [Dev,Gran,Lat] Gran Dev
  1903. \x{1cf4}\x{20f0}\x{900}ABC [Dev,Gran,Kan] [Dev,Gran,Lat] Dev Lat
  1904. \x{1cf4}\x{20f0}ABC [Dev,Gran,Kan] [Dev,Gran,Lat] Lat
  1905. \x{20f0}ABC [Dev,Gran,Lat] Lat
  1906. XYZ\x{20f0}ABC Lat [Dev,Gran,Lat] Lat
  1907. \x{a36}\x{a33}\x{900} [Dev,...] [Dev,...] Dev
  1908. \x{3001}\x{2e80}\x{3041}\x{30a1} [Bopo, Han, etc] Han Hira Kata
  1909. \x{3001}\x{30a1}\x{2e80}\x{3041} [Bopo, Han, etc] Kata Han Hira
  1910. \x{3001}\x{3105}\x{2e80}\x{1101} [Bopo, Han, etc] Bopomofo Han Hangul
  1911. \x{3105}\x{3001}\x{2e80}\x{1101} Bopomofo [Bopo, Han, etc] Han Hangul
  1912. \x{3031}\x{3041}\x{30a1}\x{2e80} [Hira Kata] Hira Kata Han
  1913. \x{060c}\x{06d4}\x{0600}\x{10d00}\x{0700} [Arab Rohg Syrc Thaa] [Arab Rohg] Arab Rohg Syrc
  1914. \x{060c}\x{06d4}\x{0700}\x{0600}\x{10d00} [Arab Rohg Syrc Thaa] [Arab Rohg] Syrc Arab Rohg
  1915. \x{2e80}\x{3041}\x{3001}\x{3031}\x{2e80} Han Hira [Bopo, Han, etc] [Hira Kata] Han
  1916. /(?<!)(*sr:)/
  1917. /(?<!X(*sr:B)C)/
  1918. /(?<=abc(?=X(*sr:BCY)Z)XBCYZ)./
  1919. abcXBCYZ!
  1920. /(?<=abc(?=X(*sr:BXY)CCC)XBXYCCC)./
  1921. abcXBXYCCC!
  1922. /^(*sr:\S*)/utf
  1923. \x{10d00}\x{10d00}\x{06d4} Rohingya Rohingya Arabic-full-stop
  1924. \x{06d4}\x{10d00}\x{10d00} Arabic-full-stop Rohingya Rohingya
  1925. \x{10d00}\x{10d00}\x{0363} Rohingya Rohingya Inherited-extend-Latin
  1926. \x{0363}\x{10d00}\x{10d00} Inherited-extend-Latin Rohingya Rohingya
  1927. AB\x{0363} Latin Latin Inherited-extend-Latin
  1928. \x{0363}AB Inherited-extend-Latin Latin Latin
  1929. AB\x{1cf7} Latin Latin Common-extended-Beng
  1930. \x{1cf7}AB Common-extend-Beng Latin Latin
  1931. \x{1cf7}\x{0993} Common-extend-Beng Bengali
  1932. A\x{1abe}BC Test enclosing mark
  1933. \x{0370}\x{1abe}\x{0371} Which can occur with any script (Greek here)
  1934. \x{3001}\x{adf9}\x{3001} [.. Hangul ..] Hangul [.. Hangul ..]
  1935. \x{3400}\x{3001}XXX Han [Han etc.]
  1936. \x{3400}\x{1cd5} Han [Bengali Devanagari]
  1937. \x{ac01}\x{3400} Hangul [.. Hangul ..]
  1938. \x{ac01}\x{1cd5} Hangul [Bengali Devanagari]
  1939. \x{102e0}\x{06d4}\x{1ee4d} [Arabic Coptic] [Arab Rohingya] Arabic
  1940. \x{102e0}\x{06d4}\x{2cc9} [Arabic Coptic] [Arab Rohingya] Coptic
  1941. \x{102e0}\x{06d4}\x{10d30} [Arabic Coptic] [Arab Rohingya] Rohingya
  1942. # Test loop breaking for empty string match
  1943. /^(*sr:A|)*BCD/utf
  1944. AABCD
  1945. ABCD
  1946. BCD
  1947. # The use of (*ACCEPT) breaks script run checking
  1948. /^(*sr:.*(*ACCEPT)ZZ)/utf
  1949. \x{1100}\x{2e80}\x{3041}\x{1101} Hangul Han Hiragana Hangul
  1950. # -------
  1951. # Test group names containing non-ASCII letters and digits
  1952. /(?'ABáC'...)\g{ABáC}/utf
  1953. abcabcdefg
  1954. /(?'XʰABC'...)/utf
  1955. xyzpq
  1956. /(?'XאABC'...)/utf
  1957. 12345
  1958. /(?'XᾈABC'...)/utf
  1959. %^&*(...
  1960. /(?'𐨐ABC'...)/utf
  1961. abcde
  1962. /^(?'אABC'...)(?&אABC)(?P=אABC)/utf
  1963. 123123123456
  1964. /^(?'אABC'...)(?&אABC)/utf
  1965. 123123123456
  1966. /\X*/
  1967. \xF3aaa\xE4\xEA\xEB\xFEa
  1968. /Я/i,utf
  1969. \x{42f}
  1970. \x{44f}
  1971. /(?=Я)/i,utf
  1972. \x{42f}
  1973. \x{44f}
  1974. # -----------------------------------------------------------------------------
  1975. # Tests for bidi control and bidi class properties.
  1976. /\p{ bidi_control }/utf
  1977. -->\x{202c}<--
  1978. /\p{bidicontrol}+/utf
  1979. -->\x{061c}\x{200e}\x{200f}\x{202a}\x{202b}\x{202c}\x{202d}<--
  1980. -->\x{2066}\x{2067}\x{2068}\x{2069}<--
  1981. /\p{bidic}+?/utf
  1982. -->\x{061c}\x{200e}\x{200f}\x{202a}\x{202b}\x{202c}\x{202d}<--
  1983. -->\x{2066}\x{2067}\x{2068}\x{2069}<--
  1984. /\p{bidi_control}++/utf
  1985. -->\x{061c}\x{200e}\x{200f}\x{202a}\x{202b}\x{202c}\x{202d}<--
  1986. -->\x{2066}\x{2067}\x{2068}\x{2069}<--
  1987. /[\p{bidi_c}]/utf
  1988. -->\x{202c}<--
  1989. /[\p{bidicontrol}]+/utf
  1990. -->\x{061c}\x{200e}\x{200f}\x{202a}\x{202b}\x{202c}\x{202d}<--
  1991. -->\x{2066}\x{2067}\x{2068}\x{2069}<--
  1992. /[\p{bidicontrol}]+?/utf
  1993. -->\x{061c}\x{200e}\x{200f}\x{202a}\x{202b}\x{202c}\x{202d}<--
  1994. -->\x{2066}\x{2067}\x{2068}\x{2069}<--
  1995. /[\p{bidicontrol}]++/utf
  1996. -->\x{061c}\x{200e}\x{200f}\x{202a}\x{202b}\x{202c}\x{202d}<--
  1997. -->\x{2066}\x{2067}\x{2068}\x{2069}<--
  1998. /[\p{bidicontrol}<>]+/utf
  1999. -->\x{061c}\x{200e}\x{200f}\x{202a}\x{202b}\x{202c}\x{202d}<--
  2000. -->\x{2066}\x{2067}\x{2068}\x{2069}<--
  2001. /\P{bidicontrol}+/g,utf
  2002. -->\x{061c}\x{200e}\x{200f}\x{202a}\x{202b}\x{202c}\x{202d}<--
  2003. -->\x{2066}\x{2067}\x{2068}\x{2069}<--
  2004. /\p{^bidicontrol}+/g,utf
  2005. -->\x{061c}\x{200e}\x{200f}\x{202a}\x{202b}\x{202c}\x{202d}<--
  2006. -->\x{2066}\x{2067}\x{2068}\x{2069}<--
  2007. /\p{bidi class = al}/utf
  2008. -->\x{061D}<--
  2009. /\p{bc = al}+/utf
  2010. -->\x{061D}\x{061e}\x{061f}<--
  2011. /\p{bidi_class : AL}+?/utf
  2012. -->\x{061D}\x{061e}\x{061f}<--
  2013. /\p{Bidi_Class : AL}++/utf
  2014. -->\x{061D}\x{061e}\x{061f}<--
  2015. /\p{b_c = aN}+/utf
  2016. -->\x{061D}\x{0602}\x{0604}\x{061f}<--
  2017. /\p{bidi class = B}+/utf
  2018. -->\x{0a}\x{0d}\x{01c}\x{01e}\x{085}\x{2029}<--
  2019. /\p{bidi class:BN}+/utf
  2020. -->\x{0}\x{08}\x{200c}\x{fffe}\x{dfffe}\x{10ffff}<--
  2021. /\p{bidiclass:cs}+/utf
  2022. -->,.\x{060c}\x{ff1a}<--
  2023. /\p{bidiclass:En}+/utf
  2024. -->09\x{b2}\x{2074}\x{1fbf9}<--
  2025. /\p{bidiclass:es}+/utf
  2026. ==>+-\x{207a}\x{ff0d}<==
  2027. /\p{bidiclass:et}+/utf
  2028. -->#\{24}%\x{a2}\x{A838}\x{1e2ff}<--
  2029. /\p{bidiclass:FSI}+/utf
  2030. -->\x{2068}<--
  2031. /\p{bidi class:L}+/utf
  2032. -->ABC<--
  2033. /\P{bidi class:L}+/utf
  2034. -->ABC<--
  2035. /\p{bidi class:LRE}+\p{bidiclass=lri}*\p{bidiclass:lro}/utf
  2036. -->\x{202a}\x{2066}\x{202d}<--
  2037. /\p{bidi class:NSM}+/utf
  2038. -->\x{9bc}\x{a71}\x{e31}<--
  2039. /\p{bidi class:ON}+/utf
  2040. -->\x{21}'()*;@\x{384}\x{2039}<=-
  2041. /\p{bidiclass:pdf}\p{bidiclass:pdi}/utf
  2042. -->\x{202c}\x{2069}<--
  2043. /\p{bidi class:R}+/utf
  2044. -->\x{590}\x{5c6}\x{200f}\x{10805}<--
  2045. /\p{bidi class:RLE}+\p{bidi class:RLI}*\p{bidi class:RLO}+/utf
  2046. -->\x{202b}\x{2067}\x{202e}<--
  2047. /\p{bidi class:S}+\p{bidiclass:WS}+/utf
  2048. -->\x{9}\x{b}\x{1f} \x{c} \x{2000} \x{3000}<--
  2049. # -----------------------------------------------------------------------------
  2050. /[\p{taml}\p{sc:ugar}]+/utf
  2051. \x{0b82}\x{10380}
  2052. /^[\p{sc:Arabic}]/utf
  2053. \= Expect no match
  2054. \x{650}
  2055. \x{651}
  2056. \x{652}
  2057. \x{653}
  2058. \x{654}
  2059. \x{655}
  2060. # -----------------------------------------------------------------------------
  2061. # Tests for newly-added Boolean Properties
  2062. /\p{ahex}\p{asciihexdigit}/utf
  2063. >4F<
  2064. /\p{alpha}\p{alphabetic}/g,utf
  2065. >AB<>\x{148}\x{1234}
  2066. /\p{ascii}\p{ascii}/g,utf
  2067. >AB<>\x{148}\x{1234}
  2068. /\p{Bidi_C}\p{bidicontrol}/g,utf
  2069. >\x{202d}\x{2069}<
  2070. /\p{Bidi_M}\p{bidimirrored}/g,utf
  2071. >\x{202d}\x{2069}<>\x{298b}\x{bb}<
  2072. /\p{cased}\p{cased}/g,utf
  2073. >AN<>\x{149}\x{120}<
  2074. /\p{caseignorable}\p{ci}/g,utf
  2075. >AN<>\x{60}\x{859}<
  2076. /\p{changeswhencasefolded}\p{cwcf}/g,utf
  2077. >AN<>\x{149}\x{120}<
  2078. /\p{changeswhencasemapped}\p{cwcm}/g,utf
  2079. >AN<>\x{149}\x{120}<
  2080. /\p{changeswhenlowercased}\p{cwl}/g,utf
  2081. >AN<>\x{149}\x{120}<>yz<
  2082. /\p{changeswhenuppercased}\p{cwu}/g,utf
  2083. >AN<>\x{149}\x{120}<>yz<
  2084. /\p{changeswhentitlecased}\p{cwt}/g,utf
  2085. >AN<>\x{149}\x{120}<>yz<
  2086. /\p{dash}\p{dash}/g,utf
  2087. >\x{2d}\x{1400}<>yz<
  2088. /\p{defaultignorablecodepoint}\p{di}/g,utf
  2089. >AN<>\x{ad}\x{e0fff}<>yz<
  2090. /\p{deprecated}\p{dep}/g,utf
  2091. >AN<>\x{149}\x{e0001}<>yz<
  2092. /\p{diacritic}\p{dia}/g,utf
  2093. >AN<>\x{f84}\x{5e}<>yz<
  2094. /\p{emojicomponent}\p{ecomp}/g,utf
  2095. >AN<>\x{200d}\x{e007f}<>yz<
  2096. /\p{emojimodifier}\p{emod}/g,utf
  2097. >AN<>\x{1f3fb}\x{1f3ff}<>yz<
  2098. /\p{emojipresentation}\p{epres}/g,utf
  2099. >AN<>\x{2653}\x{1f6d2}<>yz<
  2100. /\p{extender}\p{ext}/g,utf
  2101. >AN<>\x{1e944}\x{b7}<>yz<
  2102. /\p{extendedpictographic}\p{extpict}/g,utf
  2103. >AN<>\x{26cf}\x{ae}<>yz<
  2104. /\p{graphemebase}\p{grbase}/g,utf
  2105. >AN<>\x{10f}\x{60}<>yz<
  2106. /\p{graphemeextend}\p{grext}/g,utf
  2107. >AN<>\x{300}\x{b44}<>yz<
  2108. /\p{hexdigit}\p{hex}/g,utf
  2109. >AF23<>\x{ff46}\x{ff10}<>yz<
  2110. /\p{idcontinue}\p{idc}/g,utf
  2111. >AF23<>\x{146}\x{7a}<>yz<
  2112. /\p{ideographic}\p{ideo}/g,utf
  2113. >AF23<>\x{30000}\x{3006}<>yz<
  2114. /\p{idstart}\p{ids}/g,utf
  2115. >AF23<>\x{146}\x{7a}<>yz<
  2116. /\p{idsbinaryoperator}\p{idsb}/g,utf
  2117. >AF23<>\x{2ff0}\x{2ffb}<>yz<\x{2ff2}\x{2ff1}
  2118. /\p{idstrinaryoperator}\p{idst}/g,utf
  2119. >AF23<>\x{2ff2}\x{2ff3}<>yz<
  2120. /\p{Join Control}\p{joinc}/g,utf
  2121. >AF23<>\x{200c}\x{200d}<>yz<
  2122. /\p{logical_order_exception}\p{loe}/g,utf
  2123. >AF23<>\x{e40}\x{aabc}<>yz<
  2124. /\p{Lowercase}\p{lower}/g,utf
  2125. >AF23<>\x{146}\x{7a}<>yz<
  2126. /\p{math}\p{math}/g,utf
  2127. >AF23<>\x{2215}\x{2b}<>yz<
  2128. /\p{Non Character Code Point}\p{nchar}/g,utf
  2129. >AF23<>\x{10ffff}\x{fdd0}<>yz<
  2130. /\p{patternsyntax}\p{patsyn}/g,utf
  2131. >AF23<>\x{21cd}\x{21}<>yz<
  2132. /\p{patternwhitespace}\p{patws}/g,utf
  2133. >AF23<>\x{2029}\x{85}<>yz<
  2134. /\p{prependedconcatenationmark}\p{pcm}/g,utf
  2135. >AF23<>\x{600}\x{110cd}<>yz<
  2136. /\p{quotationmark}\p{qmark}/g,utf
  2137. >AF23<>\x{ff63}\x{22}<>yz<
  2138. /\p{radical}\p{radical}/g,utf
  2139. >AF23<>\x{2fd5}\x{2e80}<>yz<
  2140. /\p{regionalindicator}\p{ri}/g,utf
  2141. >AF23<>\x{1f1e6}\x{1f1ff}<>yz<
  2142. /=\p{whitespace}\p{space}\p{wspace}=/g,utf
  2143. >AF23<=\x{d}\x{1680}\x{3000}=>yz<
  2144. /\p{sentenceterminal}\p{sterm}/g,utf
  2145. >AF23<>\x{1da88}\x{2e}<>yz<
  2146. /\p{terminalpunctuation}\p{term}/g,utf
  2147. >AF23<>\x{1da88}\x{2e}<>yz<
  2148. /\p{unified ideograph}\p{uideo}/g,utf
  2149. >AF23<>\x{30000}\x{3400}<>yz<
  2150. /\p{UPPERcase}\p{upper}/g,utf
  2151. >AF23<>\x{146}\x{7a}<>yz<
  2152. /\p{variationselector}\p{vs}/g,utf
  2153. >AF23<>\x{180b}\x{e01ef}<>yz<
  2154. /\p{xidcontinue}\p{xidc}/g,utf
  2155. >AF23<>\x{146}\x{30}<>yz<
  2156. # -----------------------------------------------------------------------------
  2157. # Variable-length lookbehinds.
  2158. /(?<=áb?c).../g,utf
  2159. ábcdèfgácxyz
  2160. /(?<=PQR|áb?c).../g,utf
  2161. ábcdèfgácxyzPQR123
  2162. /(?<=áb?c|PQR).../g,utf
  2163. ábcdèfgácxyzPQR123
  2164. /(?<=PQ|áb?c).../g,utf
  2165. ábcdèfgácxyzPQR123
  2166. /(?<=áb?c|PQ).../g,utf
  2167. ábcdèfgácxyzPQR123
  2168. /(?<=á(b?c|d?è?è)f)X./g,utf
  2169. ácfX1zzzáèfX2zzzádèèfX3zzzX4zzz
  2170. /(?<!á(b?c|d?è?è)f)X./g,utf
  2171. ácfX1zzzáèfX2zzzádèèfX3zzzX4zzz
  2172. /(?(?<=áb?c)d|è)/utf
  2173. ábcdèfg
  2174. ácdèfg
  2175. áxdèfg
  2176. /(?<=\d{2,3}|áBC)./utf
  2177. áBCD
  2178. /(?<=á(b?c){3}d)X/utf
  2179. ZXácbccdXYZ
  2180. /(?<=á(b?c){0}d)X/utf
  2181. ZXádXYZ
  2182. /(?<=á?(b?c){0}d)X./utf
  2183. ZXádXYZ
  2184. # --------------------------------------------------------------------------
  2185. /\N{ U+1234 }/utf
  2186. \x{1234}
  2187. /\o{ 1234 }/utf
  2188. x\o{1234}y
  2189. /\x{ 1234 }/utf
  2190. x\x{1234}y
  2191. /\p{ L }/
  2192. 23AB56
  2193. /\w+/utf,ucp
  2194. --cafe\x{300}_au\x{203f}lait!
  2195. /[\w]+/utf,ucp
  2196. --cafe\x{300}_au\x{203f}lait!
  2197. /[[:word:]]+/utf,ucp
  2198. --cafe\x{300}_au\x{203f}lait!
  2199. /[[:xdigit:]]+/utf,ucp
  2200. --123ef\x{ff10}\x{ff19}\x{ff21}\x{ff26}\x{ff1a}
  2201. /\b.+?\b/utf,ucp
  2202. --cafe\x{300}_au\x{203f}lait!
  2203. /caf\B.+?\B/utf,ucp
  2204. --cafe\x{300}_au\x{203f}lait!
  2205. # End of testinput4