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.

4605 lines
87 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. 0: acb
  13. a\x7fb
  14. 0: a\x{7f}b
  15. a\x{100}b
  16. 0: a\x{100}b
  17. \= Expect no match
  18. a\nb
  19. No match
  20. /a(.{3})b/utf
  21. a\x{4000}xyb
  22. 0: a\x{4000}xyb
  23. 1: \x{4000}xy
  24. a\x{4000}\x7fyb
  25. 0: a\x{4000}\x{7f}yb
  26. 1: \x{4000}\x{7f}y
  27. a\x{4000}\x{100}yb
  28. 0: a\x{4000}\x{100}yb
  29. 1: \x{4000}\x{100}y
  30. \= Expect no match
  31. a\x{4000}b
  32. No match
  33. ac\ncb
  34. No match
  35. /a(.*?)(.)/
  36. a\xc0\x88b
  37. 0: a\xc0
  38. 1:
  39. 2: \xc0
  40. /a(.*?)(.)/utf
  41. a\x{100}b
  42. 0: a\x{100}
  43. 1:
  44. 2: \x{100}
  45. /a(.*)(.)/
  46. a\xc0\x88b
  47. 0: a\xc0\x88b
  48. 1: \xc0\x88
  49. 2: b
  50. /a(.*)(.)/utf
  51. a\x{100}b
  52. 0: a\x{100}b
  53. 1: \x{100}
  54. 2: b
  55. /a(.)(.)/
  56. a\xc0\x92bcd
  57. 0: a\xc0\x92
  58. 1: \xc0
  59. 2: \x92
  60. /a(.)(.)/utf
  61. a\x{240}bcd
  62. 0: a\x{240}b
  63. 1: \x{240}
  64. 2: b
  65. /a(.?)(.)/
  66. a\xc0\x92bcd
  67. 0: a\xc0\x92
  68. 1: \xc0
  69. 2: \x92
  70. /a(.?)(.)/utf
  71. a\x{240}bcd
  72. 0: a\x{240}b
  73. 1: \x{240}
  74. 2: b
  75. /a(.??)(.)/
  76. a\xc0\x92bcd
  77. 0: a\xc0
  78. 1:
  79. 2: \xc0
  80. /a(.??)(.)/utf
  81. a\x{240}bcd
  82. 0: a\x{240}
  83. 1:
  84. 2: \x{240}
  85. /a(.{3})b/utf
  86. a\x{1234}xyb
  87. 0: a\x{1234}xyb
  88. 1: \x{1234}xy
  89. a\x{1234}\x{4321}yb
  90. 0: a\x{1234}\x{4321}yb
  91. 1: \x{1234}\x{4321}y
  92. a\x{1234}\x{4321}\x{3412}b
  93. 0: a\x{1234}\x{4321}\x{3412}b
  94. 1: \x{1234}\x{4321}\x{3412}
  95. \= Expect no match
  96. a\x{1234}b
  97. No match
  98. ac\ncb
  99. No match
  100. /a(.{3,})b/utf
  101. a\x{1234}xyb
  102. 0: a\x{1234}xyb
  103. 1: \x{1234}xy
  104. a\x{1234}\x{4321}yb
  105. 0: a\x{1234}\x{4321}yb
  106. 1: \x{1234}\x{4321}y
  107. a\x{1234}\x{4321}\x{3412}b
  108. 0: a\x{1234}\x{4321}\x{3412}b
  109. 1: \x{1234}\x{4321}\x{3412}
  110. axxxxbcdefghijb
  111. 0: axxxxbcdefghijb
  112. 1: xxxxbcdefghij
  113. a\x{1234}\x{4321}\x{3412}\x{3421}b
  114. 0: a\x{1234}\x{4321}\x{3412}\x{3421}b
  115. 1: \x{1234}\x{4321}\x{3412}\x{3421}
  116. \= Expect no match
  117. a\x{1234}b
  118. No match
  119. /a(.{3,}?)b/utf
  120. a\x{1234}xyb
  121. 0: a\x{1234}xyb
  122. 1: \x{1234}xy
  123. a\x{1234}\x{4321}yb
  124. 0: a\x{1234}\x{4321}yb
  125. 1: \x{1234}\x{4321}y
  126. a\x{1234}\x{4321}\x{3412}b
  127. 0: a\x{1234}\x{4321}\x{3412}b
  128. 1: \x{1234}\x{4321}\x{3412}
  129. axxxxbcdefghijb
  130. 0: axxxxb
  131. 1: xxxx
  132. a\x{1234}\x{4321}\x{3412}\x{3421}b
  133. 0: a\x{1234}\x{4321}\x{3412}\x{3421}b
  134. 1: \x{1234}\x{4321}\x{3412}\x{3421}
  135. \= Expect no match
  136. a\x{1234}b
  137. No match
  138. /a(.{3,5})b/utf
  139. a\x{1234}xyb
  140. 0: a\x{1234}xyb
  141. 1: \x{1234}xy
  142. a\x{1234}\x{4321}yb
  143. 0: a\x{1234}\x{4321}yb
  144. 1: \x{1234}\x{4321}y
  145. a\x{1234}\x{4321}\x{3412}b
  146. 0: a\x{1234}\x{4321}\x{3412}b
  147. 1: \x{1234}\x{4321}\x{3412}
  148. axxxxbcdefghijb
  149. 0: axxxxb
  150. 1: xxxx
  151. a\x{1234}\x{4321}\x{3412}\x{3421}b
  152. 0: a\x{1234}\x{4321}\x{3412}\x{3421}b
  153. 1: \x{1234}\x{4321}\x{3412}\x{3421}
  154. axbxxbcdefghijb
  155. 0: axbxxb
  156. 1: xbxx
  157. axxxxxbcdefghijb
  158. 0: axxxxxb
  159. 1: xxxxx
  160. \= Expect no match
  161. a\x{1234}b
  162. No match
  163. axxxxxxbcdefghijb
  164. No match
  165. /a(.{3,5}?)b/utf
  166. a\x{1234}xyb
  167. 0: a\x{1234}xyb
  168. 1: \x{1234}xy
  169. a\x{1234}\x{4321}yb
  170. 0: a\x{1234}\x{4321}yb
  171. 1: \x{1234}\x{4321}y
  172. a\x{1234}\x{4321}\x{3412}b
  173. 0: a\x{1234}\x{4321}\x{3412}b
  174. 1: \x{1234}\x{4321}\x{3412}
  175. axxxxbcdefghijb
  176. 0: axxxxb
  177. 1: xxxx
  178. a\x{1234}\x{4321}\x{3412}\x{3421}b
  179. 0: a\x{1234}\x{4321}\x{3412}\x{3421}b
  180. 1: \x{1234}\x{4321}\x{3412}\x{3421}
  181. axbxxbcdefghijb
  182. 0: axbxxb
  183. 1: xbxx
  184. axxxxxbcdefghijb
  185. 0: axxxxxb
  186. 1: xxxxx
  187. \= Expect no match
  188. a\x{1234}b
  189. No match
  190. axxxxxxbcdefghijb
  191. No match
  192. /^[a\x{c0}]/utf
  193. \= Expect no match
  194. \x{100}
  195. No match
  196. /(?<=aXb)cd/utf
  197. aXbcd
  198. 0: cd
  199. /(?<=a\x{100}b)cd/utf
  200. a\x{100}bcd
  201. 0: cd
  202. /(?<=a\x{100000}b)cd/utf
  203. a\x{100000}bcd
  204. 0: cd
  205. /(?:\x{100}){3}b/utf
  206. \x{100}\x{100}\x{100}b
  207. 0: \x{100}\x{100}\x{100}b
  208. \= Expect no match
  209. \x{100}\x{100}b
  210. No match
  211. /\x{ab}/utf
  212. \x{ab}
  213. 0: \x{ab}
  214. \xc2\xab
  215. 0: \x{ab}
  216. \= Expect no match
  217. \x00{ab}
  218. No match
  219. /(?<=(.))X/utf
  220. WXYZ
  221. 0: X
  222. 1: W
  223. \x{256}XYZ
  224. 0: X
  225. 1: \x{256}
  226. \= Expect no match
  227. XYZ
  228. No match
  229. /[^a]+/g,utf
  230. bcd
  231. 0: bcd
  232. \x{100}aY\x{256}Z
  233. 0: \x{100}
  234. 0: Y\x{256}Z
  235. /^[^a]{2}/utf
  236. \x{100}bc
  237. 0: \x{100}b
  238. /^[^a]{2,}/utf
  239. \x{100}bcAa
  240. 0: \x{100}bcA
  241. /^[^a]{2,}?/utf
  242. \x{100}bca
  243. 0: \x{100}b
  244. /[^a]+/gi,utf
  245. bcd
  246. 0: bcd
  247. \x{100}aY\x{256}Z
  248. 0: \x{100}
  249. 0: Y\x{256}Z
  250. /^[^a]{2}/i,utf
  251. \x{100}bc
  252. 0: \x{100}b
  253. /^[^a]{2,}/i,utf
  254. \x{100}bcAa
  255. 0: \x{100}bc
  256. /^[^a]{2,}?/i,utf
  257. \x{100}bca
  258. 0: \x{100}b
  259. /\x{100}{0,0}/utf
  260. abcd
  261. 0:
  262. /\x{100}?/utf
  263. abcd
  264. 0:
  265. \x{100}\x{100}
  266. 0: \x{100}
  267. /\x{100}{0,3}/utf
  268. \x{100}\x{100}
  269. 0: \x{100}\x{100}
  270. \x{100}\x{100}\x{100}\x{100}
  271. 0: \x{100}\x{100}\x{100}
  272. /\x{100}*/utf
  273. abce
  274. 0:
  275. \x{100}\x{100}\x{100}\x{100}
  276. 0: \x{100}\x{100}\x{100}\x{100}
  277. /\x{100}{1,1}/utf
  278. abcd\x{100}\x{100}\x{100}\x{100}
  279. 0: \x{100}
  280. /\x{100}{1,3}/utf
  281. abcd\x{100}\x{100}\x{100}\x{100}
  282. 0: \x{100}\x{100}\x{100}
  283. /\x{100}+/utf
  284. abcd\x{100}\x{100}\x{100}\x{100}
  285. 0: \x{100}\x{100}\x{100}\x{100}
  286. /\x{100}{3}/utf
  287. abcd\x{100}\x{100}\x{100}XX
  288. 0: \x{100}\x{100}\x{100}
  289. /\x{100}{3,5}/utf
  290. abcd\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}XX
  291. 0: \x{100}\x{100}\x{100}\x{100}\x{100}
  292. /\x{100}{3,}/utf
  293. abcd\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}XX
  294. 0: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
  295. /(?<=a\x{100}{2}b)X/utf,aftertext
  296. Xyyya\x{100}\x{100}bXzzz
  297. 0: X
  298. 0+ zzz
  299. /\D*/utf
  300. aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  301. 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  302. /\D*/utf
  303. \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}
  304. 0: \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}
  305. /\D/utf
  306. 1X2
  307. 0: X
  308. 1\x{100}2
  309. 0: \x{100}
  310. />\S/utf
  311. > >X Y
  312. 0: >X
  313. > >\x{100} Y
  314. 0: >\x{100}
  315. /\d/utf
  316. \x{100}3
  317. 0: 3
  318. /\s/utf
  319. \x{100} X
  320. 0:
  321. /\D+/utf
  322. 12abcd34
  323. 0: abcd
  324. \= Expect no match
  325. 1234
  326. No match
  327. /\D{2,3}/utf
  328. 12abcd34
  329. 0: abc
  330. 12ab34
  331. 0: ab
  332. \= Expect no match
  333. 1234
  334. No match
  335. 12a34
  336. No match
  337. /\D{2,3}?/utf
  338. 12abcd34
  339. 0: ab
  340. 12ab34
  341. 0: ab
  342. \= Expect no match
  343. 1234
  344. No match
  345. 12a34
  346. No match
  347. /\d+/utf
  348. 12abcd34
  349. 0: 12
  350. /\d{2,3}/utf
  351. 12abcd34
  352. 0: 12
  353. 1234abcd
  354. 0: 123
  355. \= Expect no match
  356. 1.4
  357. No match
  358. /\d{2,3}?/utf
  359. 12abcd34
  360. 0: 12
  361. 1234abcd
  362. 0: 12
  363. \= Expect no match
  364. 1.4
  365. No match
  366. /\S+/utf
  367. 12abcd34
  368. 0: 12abcd34
  369. \= Expect no match
  370. \ \
  371. No match
  372. /\S{2,3}/utf
  373. 12abcd34
  374. 0: 12a
  375. 1234abcd
  376. 0: 123
  377. \= Expect no match
  378. \ \
  379. No match
  380. /\S{2,3}?/utf
  381. 12abcd34
  382. 0: 12
  383. 1234abcd
  384. 0: 12
  385. \= Expect no match
  386. \ \
  387. No match
  388. />\s+</utf,aftertext
  389. 12> <34
  390. 0: > <
  391. 0+ 34
  392. />\s{2,3}</utf,aftertext
  393. ab> <cd
  394. 0: > <
  395. 0+ cd
  396. ab> <ce
  397. 0: > <
  398. 0+ ce
  399. \= Expect no match
  400. ab> <cd
  401. No match
  402. />\s{2,3}?</utf,aftertext
  403. ab> <cd
  404. 0: > <
  405. 0+ cd
  406. ab> <ce
  407. 0: > <
  408. 0+ ce
  409. \= Expect no match
  410. ab> <cd
  411. No match
  412. /\w+/utf
  413. 12 34
  414. 0: 12
  415. \= Expect no match
  416. +++=*!
  417. No match
  418. /\w{2,3}/utf
  419. ab cd
  420. 0: ab
  421. abcd ce
  422. 0: abc
  423. \= Expect no match
  424. a.b.c
  425. No match
  426. /\w{2,3}?/utf
  427. ab cd
  428. 0: ab
  429. abcd ce
  430. 0: ab
  431. \= Expect no match
  432. a.b.c
  433. No match
  434. /\W+/utf
  435. 12====34
  436. 0: ====
  437. \= Expect no match
  438. abcd
  439. No match
  440. /\W{2,3}/utf
  441. ab====cd
  442. 0: ===
  443. ab==cd
  444. 0: ==
  445. \= Expect no match
  446. a.b.c
  447. No match
  448. /\W{2,3}?/utf
  449. ab====cd
  450. 0: ==
  451. ab==cd
  452. 0: ==
  453. \= Expect no match
  454. a.b.c
  455. No match
  456. /[\x{100}]/utf
  457. \x{100}
  458. 0: \x{100}
  459. Z\x{100}
  460. 0: \x{100}
  461. \x{100}Z
  462. 0: \x{100}
  463. /[Z\x{100}]/utf
  464. Z\x{100}
  465. 0: Z
  466. \x{100}
  467. 0: \x{100}
  468. \x{100}Z
  469. 0: \x{100}
  470. /[\x{100}\x{200}]/utf
  471. ab\x{100}cd
  472. 0: \x{100}
  473. ab\x{200}cd
  474. 0: \x{200}
  475. /[\x{100}-\x{200}]/utf
  476. ab\x{100}cd
  477. 0: \x{100}
  478. ab\x{200}cd
  479. 0: \x{200}
  480. ab\x{111}cd
  481. 0: \x{111}
  482. /[z-\x{200}]/utf
  483. ab\x{100}cd
  484. 0: \x{100}
  485. ab\x{200}cd
  486. 0: \x{200}
  487. ab\x{111}cd
  488. 0: \x{111}
  489. abzcd
  490. 0: z
  491. ab|cd
  492. 0: |
  493. /[Q\x{100}\x{200}]/utf
  494. ab\x{100}cd
  495. 0: \x{100}
  496. ab\x{200}cd
  497. 0: \x{200}
  498. Q?
  499. 0: Q
  500. /[Q\x{100}-\x{200}]/utf
  501. ab\x{100}cd
  502. 0: \x{100}
  503. ab\x{200}cd
  504. 0: \x{200}
  505. ab\x{111}cd
  506. 0: \x{111}
  507. Q?
  508. 0: Q
  509. /[Qz-\x{200}]/utf
  510. ab\x{100}cd
  511. 0: \x{100}
  512. ab\x{200}cd
  513. 0: \x{200}
  514. ab\x{111}cd
  515. 0: \x{111}
  516. abzcd
  517. 0: z
  518. ab|cd
  519. 0: |
  520. Q?
  521. 0: Q
  522. /[\x{100}\x{200}]{1,3}/utf
  523. ab\x{100}cd
  524. 0: \x{100}
  525. ab\x{200}cd
  526. 0: \x{200}
  527. ab\x{200}\x{100}\x{200}\x{100}cd
  528. 0: \x{200}\x{100}\x{200}
  529. /[\x{100}\x{200}]{1,3}?/utf
  530. ab\x{100}cd
  531. 0: \x{100}
  532. ab\x{200}cd
  533. 0: \x{200}
  534. ab\x{200}\x{100}\x{200}\x{100}cd
  535. 0: \x{200}
  536. /[Q\x{100}\x{200}]{1,3}/utf
  537. ab\x{100}cd
  538. 0: \x{100}
  539. ab\x{200}cd
  540. 0: \x{200}
  541. ab\x{200}\x{100}\x{200}\x{100}cd
  542. 0: \x{200}\x{100}\x{200}
  543. /[Q\x{100}\x{200}]{1,3}?/utf
  544. ab\x{100}cd
  545. 0: \x{100}
  546. ab\x{200}cd
  547. 0: \x{200}
  548. ab\x{200}\x{100}\x{200}\x{100}cd
  549. 0: \x{200}
  550. /(?<=[\x{100}\x{200}])X/utf
  551. abc\x{200}X
  552. 0: X
  553. abc\x{100}X
  554. 0: X
  555. \= Expect no match
  556. X
  557. No match
  558. /(?<=[Q\x{100}\x{200}])X/utf
  559. abc\x{200}X
  560. 0: X
  561. abc\x{100}X
  562. 0: X
  563. abQX
  564. 0: X
  565. \= Expect no match
  566. X
  567. No match
  568. /(?<=[\x{100}\x{200}]{3})X/utf
  569. abc\x{100}\x{200}\x{100}X
  570. 0: X
  571. \= Expect no match
  572. abc\x{200}X
  573. No match
  574. X
  575. No match
  576. /[^\x{100}\x{200}]X/utf
  577. AX
  578. 0: AX
  579. \x{150}X
  580. 0: \x{150}X
  581. \x{500}X
  582. 0: \x{500}X
  583. \= Expect no match
  584. \x{100}X
  585. No match
  586. \x{200}X
  587. No match
  588. /[^Q\x{100}\x{200}]X/utf
  589. AX
  590. 0: AX
  591. \x{150}X
  592. 0: \x{150}X
  593. \x{500}X
  594. 0: \x{500}X
  595. \= Expect no match
  596. \x{100}X
  597. No match
  598. \x{200}X
  599. No match
  600. QX
  601. No match
  602. /[^\x{100}-\x{200}]X/utf
  603. AX
  604. 0: AX
  605. \x{500}X
  606. 0: \x{500}X
  607. \= Expect no match
  608. \x{100}X
  609. No match
  610. \x{150}X
  611. No match
  612. \x{200}X
  613. No match
  614. /[z-\x{100}]/i,utf
  615. z
  616. 0: z
  617. Z
  618. 0: Z
  619. \x{100}
  620. 0: \x{100}
  621. \= Expect no match
  622. \x{102}
  623. No match
  624. y
  625. No match
  626. /[\xFF]/
  627. >\xff<
  628. 0: \xff
  629. /[\xff]/utf
  630. >\x{ff}<
  631. 0: \x{ff}
  632. /[^\xFF]/
  633. XYZ
  634. 0: X
  635. /[^\xff]/utf
  636. XYZ
  637. 0: X
  638. \x{123}
  639. 0: \x{123}
  640. /^[ac]*b/utf
  641. \= Expect no match
  642. xb
  643. No match
  644. /^[ac\x{100}]*b/utf
  645. \= Expect no match
  646. xb
  647. No match
  648. /^[^x]*b/i,utf
  649. \= Expect no match
  650. xb
  651. No match
  652. /^[^x]*b/utf
  653. \= Expect no match
  654. xb
  655. No match
  656. /^\d*b/utf
  657. \= Expect no match
  658. xb
  659. No match
  660. /(|a)/g,utf
  661. catac
  662. 0:
  663. 1:
  664. 0:
  665. 1:
  666. 0: a
  667. 1: a
  668. 0:
  669. 1:
  670. 0:
  671. 1:
  672. 0: a
  673. 1: a
  674. 0:
  675. 1:
  676. 0:
  677. 1:
  678. a\x{256}a
  679. 0:
  680. 1:
  681. 0: a
  682. 1: a
  683. 0:
  684. 1:
  685. 0:
  686. 1:
  687. 0: a
  688. 1: a
  689. 0:
  690. 1:
  691. /^\x{85}$/i,utf
  692. \x{85}
  693. 0: \x{85}
  694. /^ሴ/utf
  695. 0: \x{1234}
  696. /^\ሴ/utf
  697. 0: \x{1234}
  698. /(?s)(.{1,5})/utf
  699. abcdefg
  700. 0: abcde
  701. 1: abcde
  702. ab
  703. 0: ab
  704. 1: ab
  705. /a*\x{100}*\w/utf
  706. a
  707. 0: a
  708. /\S\S/g,utf
  709. A\x{a3}BC
  710. 0: A\x{a3}
  711. 0: BC
  712. /\S{2}/g,utf
  713. A\x{a3}BC
  714. 0: A\x{a3}
  715. 0: BC
  716. /\W\W/g,utf
  717. +\x{a3}==
  718. 0: +\x{a3}
  719. 0: ==
  720. /\W{2}/g,utf
  721. +\x{a3}==
  722. 0: +\x{a3}
  723. 0: ==
  724. /\S/g,utf
  725. \x{442}\x{435}\x{441}\x{442}
  726. 0: \x{442}
  727. 0: \x{435}
  728. 0: \x{441}
  729. 0: \x{442}
  730. /[\S]/g,utf
  731. \x{442}\x{435}\x{441}\x{442}
  732. 0: \x{442}
  733. 0: \x{435}
  734. 0: \x{441}
  735. 0: \x{442}
  736. /\D/g,utf
  737. \x{442}\x{435}\x{441}\x{442}
  738. 0: \x{442}
  739. 0: \x{435}
  740. 0: \x{441}
  741. 0: \x{442}
  742. /[\D]/g,utf
  743. \x{442}\x{435}\x{441}\x{442}
  744. 0: \x{442}
  745. 0: \x{435}
  746. 0: \x{441}
  747. 0: \x{442}
  748. /\W/g,utf
  749. \x{2442}\x{2435}\x{2441}\x{2442}
  750. 0: \x{2442}
  751. 0: \x{2435}
  752. 0: \x{2441}
  753. 0: \x{2442}
  754. /[\W]/g,utf
  755. \x{2442}\x{2435}\x{2441}\x{2442}
  756. 0: \x{2442}
  757. 0: \x{2435}
  758. 0: \x{2441}
  759. 0: \x{2442}
  760. /[\S\s]*/utf
  761. abc\n\r\x{442}\x{435}\x{441}\x{442}xyz
  762. 0: abc\x{0a}\x{0d}\x{442}\x{435}\x{441}\x{442}xyz
  763. /[\x{41f}\S]/g,utf
  764. \x{442}\x{435}\x{441}\x{442}
  765. 0: \x{442}
  766. 0: \x{435}
  767. 0: \x{441}
  768. 0: \x{442}
  769. /.[^\S]./g,utf
  770. abc def\x{442}\x{443}xyz\npqr
  771. 0: c d
  772. 0: z\x{0a}p
  773. /.[^\S\n]./g,utf
  774. abc def\x{442}\x{443}xyz\npqr
  775. 0: c d
  776. /[[:^alnum:]]/g,utf
  777. +\x{2442}
  778. 0: +
  779. 0: \x{2442}
  780. /[[:^alpha:]]/g,utf
  781. +\x{2442}
  782. 0: +
  783. 0: \x{2442}
  784. /[[:^ascii:]]/g,utf
  785. A\x{442}
  786. 0: \x{442}
  787. /[[:^blank:]]/g,utf
  788. A\x{442}
  789. 0: A
  790. 0: \x{442}
  791. /[[:^cntrl:]]/g,utf
  792. A\x{442}
  793. 0: A
  794. 0: \x{442}
  795. /[[:^digit:]]/g,utf
  796. A\x{442}
  797. 0: A
  798. 0: \x{442}
  799. /[[:^graph:]]/g,utf
  800. \x19\x{e01ff}
  801. 0: \x{19}
  802. 0: \x{e01ff}
  803. /[[:^lower:]]/g,utf
  804. A\x{422}
  805. 0: A
  806. 0: \x{422}
  807. /[[:^print:]]/g,utf
  808. \x{19}\x{e01ff}
  809. 0: \x{19}
  810. 0: \x{e01ff}
  811. /[[:^punct:]]/g,utf
  812. A\x{442}
  813. 0: A
  814. 0: \x{442}
  815. /[[:^space:]]/g,utf
  816. A\x{442}
  817. 0: A
  818. 0: \x{442}
  819. /[[:^upper:]]/g,utf
  820. a\x{442}
  821. 0: a
  822. 0: \x{442}
  823. /[[:^word:]]/g,utf
  824. +\x{2442}
  825. 0: +
  826. 0: \x{2442}
  827. /[[:^xdigit:]]/g,utf
  828. M\x{442}
  829. 0: M
  830. 0: \x{442}
  831. /[^ABCDEFGHIJKLMNOPQRSTUVWXYZÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮİIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŸŹŻŽƁƂƄƆƇƉƊƋƎƏƐƑƓƔƖƗƘƜƝƟƠƢƤƦƧƩƬƮƯƱƲƳƵƷƸƼDŽLJNJǍǏǑǓǕǗǙǛǞǠǢǤǦǨǪǬǮDZǴǶǷǸǺǼǾȀȂȄȆȈȊȌȎȐȒȔȖȘȚȜȞȠȢȤȦȨȪȬȮȰȲȺȻȽȾɁΆΈΉΊΌΎΏΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩΪΫϒϓϔϘϚϜϞϠϢϤϦϨϪϬϮϴϷϹϺϽϾϿЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯѠѢѤѦѨѪѬѮѰѲѴѶѸѺѼѾҀҊҌҎҐҒҔҖҘҚҜҞҠҢҤҦҨҪҬҮҰҲҴҶҸҺҼҾӀӁӃӅӇӉӋӍӐӒӔӖӘӚӜӞӠӢӤӦӨӪӬӮӰӲӴӶӸԀԂԄԆԈԊԌԎԱԲԳԴԵԶԷԸԹԺԻԼԽԾԿՀՁՂՃՄՅՆՇՈՉՊՋՌՍՎՏՐՑՒՓՔՕՖႠႡႢႣႤႥႦႧႨႩႪႫႬႭႮႯႰႱႲႳႴႵႶႷႸႹႺႻႼႽႾႿჀჁჂჃჄჅḀḂḄḆḈḊḌḎḐḒḔḖḘḚḜḞḠḢḤḦḨḪḬḮḰḲḴḶḸḺḼḾṀṂṄṆṈṊṌṎṐṒṔṖṘṚṜṞṠṢṤṦṨṪṬṮṰṲṴṶṸṺṼṾẀẂẄẆẈẊẌẎẐẒẔẠẢẤẦẨẪẬẮẰẲẴẶẸẺẼẾỀỂỄỆỈỊỌỎỐỒỔỖỘỚỜỞỠỢỤỦỨỪỬỮỰỲỴỶỸἈἉἊἋἌἍἎἏἘἙἚἛἜἝἨἩἪἫἬἭἮἯἸἹἺἻἼἽἾἿὈὉὊὋὌὍὙὛὝὟὨὩὪὫὬὭὮὯᾸᾹᾺΆῈΈῊΉῘῙῚΊῨῩῪΎῬῸΌῺΏabcdefghijklmnopqrstuvwxyzªµºßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿāăąćĉċčďđēĕėęěĝğġģĥħĩīĭįıijĵķĸĺļľŀłńņňʼnŋōŏőœŕŗřśŝşšţťŧũūŭůűųŵŷźżžſƀƃƅƈƌƍƒƕƙƚƛƞơƣƥƨƪƫƭưƴƶƹƺƽƾƿdžljnjǎǐǒǔǖǘǚǜǝǟǡǣǥǧǩǫǭǯǰdzǵǹǻǽǿȁȃȅȇȉȋȍȏȑȓȕȗșțȝȟȡȣȥȧȩȫȭȯȱȳȴȵȶȷȸȹȼȿɀɐɑɒɓɔɕɖɗɘəɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯΐάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώϐϑϕϖϗϙϛϝϟϡϣϥϧϩϫϭϯϰϱϲϳϵϸϻϼабвгдежзийклмнопрстуфхцчшщъыьэюяѐёђѓєѕіїјљњћќѝўџѡѣѥѧѩѫѭѯѱѳѵѷѹѻѽѿҁҋҍҏґғҕҗҙқҝҟҡңҥҧҩҫҭүұҳҵҷҹһҽҿӂӄӆӈӊӌӎӑӓӕӗәӛӝӟӡӣӥӧөӫӭӯӱӳӵӷӹԁԃԅԇԉԋԍԏաբգդեզէըթժիլխծկհձղճմյնշոչպջռսվտրցւփքօֆևᴀᴁᴂᴃᴄᴅᴆᴇᴈᴉᴊᴋᴌᴍᴎᴏᴐᴑᴒᴓᴔᴕᴖᴗᴘᴙᴚᴛᴜᴝᴞᴟᴠᴡᴢᴣᴤᴥᴦᴧᴨᴩᴪᴫᵢᵣᵤᵥᵦᵧᵨᵩᵪᵫᵬᵭᵮᵯᵰᵱᵲᵳᵴᵵᵶᵷᵹᵺᵻᵼᵽᵾᵿᶀᶁᶂᶃᶄᶅᶆᶇᶈᶉᶊᶋᶌᶍᶎᶏᶐᶑᶒᶓᶔᶕᶖᶗᶘᶙᶚḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕẖẗẘẙẚẛạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹἀἁἂἃἄἅἆἇἐἑἒἓἔἕἠἡἢἣἤἥἦἧἰἱἲἳἴἵἶἷὀὁὂὃὄὅὐὑὒὓὔὕὖὗὠὡὢὣὤὥὦὧὰάὲέὴήὶίὸόὺύὼώᾀᾁᾂᾃᾄᾅᾆᾇᾐᾑᾒᾓᾔᾕᾖᾗᾠᾡᾢᾣᾤᾥᾦᾧᾰᾱᾲᾳᾴᾶᾷιῂῃῄῆῇῐῑῒΐῖῗῠῡῢΰῤῥῦῧῲῳῴῶῷⲁⲃⲅⲇⲉⲋⲍⲏⲑⲓⲕⲗⲙⲛⲝⲟⲡⲣⲥⲧⲩⲫⲭⲯⲱⲳⲵⲷⲹⲻⲽⲿⳁⳃⳅⳇⳉⳋⳍⳏⳑⳓⳕⳗⳙⳛⳝⳟⳡⳣⳤⴀⴁⴂⴃⴄⴅⴆⴇⴈⴉⴊⴋⴌⴍⴎⴏⴐⴑⴒⴓⴔⴕⴖⴗⴘⴙⴚⴛⴜⴝⴞⴟⴠⴡⴢⴣⴤⴥfffiflffifflſtstﬓﬔﬕﬖﬗ\d_^]/utf
  832. /^[^d]*?$/
  833. abc
  834. 0: abc
  835. /^[^d]*?$/utf
  836. abc
  837. 0: abc
  838. /^[^d]*?$/i
  839. abc
  840. 0: abc
  841. /^[^d]*?$/i,utf
  842. abc
  843. 0: abc
  844. /(?i)[\xc3\xa9\xc3\xbd]|[\xc3\xa9\xc3\xbdA]/utf
  845. /^[a\x{c0}]b/utf
  846. \x{c0}b
  847. 0: \x{c0}b
  848. /^([a\x{c0}]*?)aa/utf
  849. a\x{c0}aaaa/
  850. 0: a\x{c0}aa
  851. 1: a\x{c0}
  852. /^([a\x{c0}]*?)aa/utf
  853. a\x{c0}aaaa/
  854. 0: a\x{c0}aa
  855. 1: a\x{c0}
  856. a\x{c0}a\x{c0}aaa/
  857. 0: a\x{c0}a\x{c0}aa
  858. 1: a\x{c0}a\x{c0}
  859. /^([a\x{c0}]*)aa/utf
  860. a\x{c0}aaaa/
  861. 0: a\x{c0}aaaa
  862. 1: a\x{c0}aa
  863. a\x{c0}a\x{c0}aaa/
  864. 0: a\x{c0}a\x{c0}aaa
  865. 1: a\x{c0}a\x{c0}a
  866. /^([a\x{c0}]*)a\x{c0}/utf
  867. a\x{c0}aaaa/
  868. 0: a\x{c0}
  869. 1:
  870. a\x{c0}a\x{c0}aaa/
  871. 0: a\x{c0}a\x{c0}
  872. 1: a\x{c0}
  873. /A*/g,utf
  874. AAB\x{123}BAA
  875. 0: AA
  876. 0:
  877. 0:
  878. 0:
  879. 0: AA
  880. 0:
  881. /(abc)\1/i,utf
  882. \= Expect no match
  883. abc
  884. No match
  885. /(abc)\1/utf
  886. \= Expect no match
  887. abc
  888. No match
  889. /a(*:a\x{1234}b)/utf,mark
  890. abc
  891. 0: a
  892. MK: a\x{1234}b
  893. /a(*:a£b)/utf,mark
  894. abc
  895. 0: a
  896. MK: a\x{a3}b
  897. # Noncharacters
  898. /./utf
  899. \x{fffe}
  900. 0: \x{fffe}
  901. \x{ffff}
  902. 0: \x{ffff}
  903. \x{1fffe}
  904. 0: \x{1fffe}
  905. \x{1ffff}
  906. 0: \x{1ffff}
  907. \x{2fffe}
  908. 0: \x{2fffe}
  909. \x{2ffff}
  910. 0: \x{2ffff}
  911. \x{3fffe}
  912. 0: \x{3fffe}
  913. \x{3ffff}
  914. 0: \x{3ffff}
  915. \x{4fffe}
  916. 0: \x{4fffe}
  917. \x{4ffff}
  918. 0: \x{4ffff}
  919. \x{5fffe}
  920. 0: \x{5fffe}
  921. \x{5ffff}
  922. 0: \x{5ffff}
  923. \x{6fffe}
  924. 0: \x{6fffe}
  925. \x{6ffff}
  926. 0: \x{6ffff}
  927. \x{7fffe}
  928. 0: \x{7fffe}
  929. \x{7ffff}
  930. 0: \x{7ffff}
  931. \x{8fffe}
  932. 0: \x{8fffe}
  933. \x{8ffff}
  934. 0: \x{8ffff}
  935. \x{9fffe}
  936. 0: \x{9fffe}
  937. \x{9ffff}
  938. 0: \x{9ffff}
  939. \x{afffe}
  940. 0: \x{afffe}
  941. \x{affff}
  942. 0: \x{affff}
  943. \x{bfffe}
  944. 0: \x{bfffe}
  945. \x{bffff}
  946. 0: \x{bffff}
  947. \x{cfffe}
  948. 0: \x{cfffe}
  949. \x{cffff}
  950. 0: \x{cffff}
  951. \x{dfffe}
  952. 0: \x{dfffe}
  953. \x{dffff}
  954. 0: \x{dffff}
  955. \x{efffe}
  956. 0: \x{efffe}
  957. \x{effff}
  958. 0: \x{effff}
  959. \x{ffffe}
  960. 0: \x{ffffe}
  961. \x{fffff}
  962. 0: \x{fffff}
  963. \x{10fffe}
  964. 0: \x{10fffe}
  965. \x{10ffff}
  966. 0: \x{10ffff}
  967. \x{fdd0}
  968. 0: \x{fdd0}
  969. \x{fdd1}
  970. 0: \x{fdd1}
  971. \x{fdd2}
  972. 0: \x{fdd2}
  973. \x{fdd3}
  974. 0: \x{fdd3}
  975. \x{fdd4}
  976. 0: \x{fdd4}
  977. \x{fdd5}
  978. 0: \x{fdd5}
  979. \x{fdd6}
  980. 0: \x{fdd6}
  981. \x{fdd7}
  982. 0: \x{fdd7}
  983. \x{fdd8}
  984. 0: \x{fdd8}
  985. \x{fdd9}
  986. 0: \x{fdd9}
  987. \x{fdda}
  988. 0: \x{fdda}
  989. \x{fddb}
  990. 0: \x{fddb}
  991. \x{fddc}
  992. 0: \x{fddc}
  993. \x{fddd}
  994. 0: \x{fddd}
  995. \x{fdde}
  996. 0: \x{fdde}
  997. \x{fddf}
  998. 0: \x{fddf}
  999. \x{fde0}
  1000. 0: \x{fde0}
  1001. \x{fde1}
  1002. 0: \x{fde1}
  1003. \x{fde2}
  1004. 0: \x{fde2}
  1005. \x{fde3}
  1006. 0: \x{fde3}
  1007. \x{fde4}
  1008. 0: \x{fde4}
  1009. \x{fde5}
  1010. 0: \x{fde5}
  1011. \x{fde6}
  1012. 0: \x{fde6}
  1013. \x{fde7}
  1014. 0: \x{fde7}
  1015. \x{fde8}
  1016. 0: \x{fde8}
  1017. \x{fde9}
  1018. 0: \x{fde9}
  1019. \x{fdea}
  1020. 0: \x{fdea}
  1021. \x{fdeb}
  1022. 0: \x{fdeb}
  1023. \x{fdec}
  1024. 0: \x{fdec}
  1025. \x{fded}
  1026. 0: \x{fded}
  1027. \x{fdee}
  1028. 0: \x{fdee}
  1029. \x{fdef}
  1030. 0: \x{fdef}
  1031. /^\d*\w{4}/utf
  1032. 1234
  1033. 0: 1234
  1034. \= Expect no match
  1035. 123
  1036. No match
  1037. /^[^b]*\w{4}/utf
  1038. aaaa
  1039. 0: aaaa
  1040. \= Expect no match
  1041. aaa
  1042. No match
  1043. /^[^b]*\w{4}/i,utf
  1044. aaaa
  1045. 0: aaaa
  1046. \= Expect no match
  1047. aaa
  1048. No match
  1049. /^\x{100}*.{4}/utf
  1050. \x{100}\x{100}\x{100}\x{100}
  1051. 0: \x{100}\x{100}\x{100}\x{100}
  1052. \= Expect no match
  1053. \x{100}\x{100}\x{100}
  1054. No match
  1055. /^\x{100}*.{4}/i,utf
  1056. \x{100}\x{100}\x{100}\x{100}
  1057. 0: \x{100}\x{100}\x{100}\x{100}
  1058. \= Expect no match
  1059. \x{100}\x{100}\x{100}
  1060. No match
  1061. /^a+[a\x{200}]/utf
  1062. aa
  1063. 0: aa
  1064. /^.\B.\B./utf
  1065. \x{10123}\x{10124}\x{10125}
  1066. 0: \x{10123}\x{10124}\x{10125}
  1067. /^#[^\x{ffff}]#[^\x{ffff}]#[^\x{ffff}]#/utf
  1068. #\x{10000}#\x{100}#\x{10ffff}#
  1069. 0: #\x{10000}#\x{100}#\x{10ffff}#
  1070. # Unicode property support tests
  1071. /^\pC\pL\pM\pN\pP\pS\pZ</utf
  1072. \x7f\x{c0}\x{30f}\x{660}\x{66c}\x{f01}\x{1680}<
  1073. 0: \x{7f}\x{c0}\x{30f}\x{660}\x{66c}\x{f01}\x{1680}<
  1074. \np\x{300}9!\$ <
  1075. 0: \x{0a}p\x{300}9!$ <
  1076. \= Expect no match
  1077. ap\x{300}9!\$ <
  1078. No match
  1079. /^\PC/utf
  1080. X
  1081. 0: X
  1082. \= Expect no match
  1083. \x7f
  1084. No match
  1085. /^\PL/utf
  1086. 9
  1087. 0: 9
  1088. \= Expect no match
  1089. \x{c0}
  1090. No match
  1091. /^\PM/utf
  1092. X
  1093. 0: X
  1094. \= Expect no match
  1095. \x{30f}
  1096. No match
  1097. /^\PN/utf
  1098. X
  1099. 0: X
  1100. \= Expect no match
  1101. \x{660}
  1102. No match
  1103. /^\PP/utf
  1104. X
  1105. 0: X
  1106. \= Expect no match
  1107. \x{66c}
  1108. No match
  1109. /^\PS/utf
  1110. X
  1111. 0: X
  1112. \= Expect no match
  1113. \x{f01}
  1114. No match
  1115. /^\PZ/utf
  1116. X
  1117. 0: X
  1118. \= Expect no match
  1119. \x{1680}
  1120. No match
  1121. /^\p{Cc}/utf
  1122. \x{017}
  1123. 0: \x{17}
  1124. \x{09f}
  1125. 0: \x{9f}
  1126. \= Expect no match
  1127. \x{0600}
  1128. No match
  1129. /^\p{Cf}/utf
  1130. \x{601}
  1131. 0: \x{601}
  1132. \= Expect no match
  1133. \x{09f}
  1134. No match
  1135. /^\p{Cn}/utf
  1136. \x{e0000}
  1137. 0: \x{e0000}
  1138. \= Expect no match
  1139. \x{09f}
  1140. No match
  1141. /^\p{Co}/utf
  1142. \x{f8ff}
  1143. 0: \x{f8ff}
  1144. \= Expect no match
  1145. \x{09f}
  1146. No match
  1147. /^\p{Ll}/utf
  1148. a
  1149. 0: a
  1150. \= Expect no match
  1151. Z
  1152. No match
  1153. \x{e000}
  1154. No match
  1155. /^\p{Lm}/utf
  1156. \x{2b0}
  1157. 0: \x{2b0}
  1158. \= Expect no match
  1159. a
  1160. No match
  1161. /^\p{Lo}/utf
  1162. \x{1bb}
  1163. 0: \x{1bb}
  1164. \x{3400}
  1165. 0: \x{3400}
  1166. \x{3401}
  1167. 0: \x{3401}
  1168. \x{4d00}
  1169. 0: \x{4d00}
  1170. \x{4db4}
  1171. 0: \x{4db4}
  1172. \x{4db5}
  1173. 0: \x{4db5}
  1174. \x{4db6}
  1175. 0: \x{4db6}
  1176. \= Expect no match
  1177. a
  1178. No match
  1179. \x{2b0}
  1180. No match
  1181. /^\p{Lt}/utf
  1182. \x{1c5}
  1183. 0: \x{1c5}
  1184. \= Expect no match
  1185. a
  1186. No match
  1187. \x{2b0}
  1188. No match
  1189. /^\p{Lu}/utf
  1190. A
  1191. 0: A
  1192. \= Expect no match
  1193. \x{2b0}
  1194. No match
  1195. /^\p{Mc}/utf
  1196. \x{903}
  1197. 0: \x{903}
  1198. \= Expect no match
  1199. X
  1200. No match
  1201. \x{300}
  1202. No match
  1203. /^\p{Me}/utf
  1204. \x{488}
  1205. 0: \x{488}
  1206. \= Expect no match
  1207. X
  1208. No match
  1209. \x{903}
  1210. No match
  1211. \x{300}
  1212. No match
  1213. /^\p{Mn}/utf
  1214. \x{300}
  1215. 0: \x{300}
  1216. \= Expect no match
  1217. X
  1218. No match
  1219. \x{903}
  1220. No match
  1221. /^\p{Nd}+/utf
  1222. 0123456789\x{660}\x{661}\x{662}\x{663}\x{664}\x{665}\x{666}\x{667}\x{668}\x{669}\x{66a}
  1223. 0: 0123456789\x{660}\x{661}\x{662}\x{663}\x{664}\x{665}\x{666}\x{667}\x{668}\x{669}
  1224. \x{6f0}\x{6f1}\x{6f2}\x{6f3}\x{6f4}\x{6f5}\x{6f6}\x{6f7}\x{6f8}\x{6f9}\x{6fa}
  1225. 0: \x{6f0}\x{6f1}\x{6f2}\x{6f3}\x{6f4}\x{6f5}\x{6f6}\x{6f7}\x{6f8}\x{6f9}
  1226. \x{966}\x{967}\x{968}\x{969}\x{96a}\x{96b}\x{96c}\x{96d}\x{96e}\x{96f}\x{970}
  1227. 0: \x{966}\x{967}\x{968}\x{969}\x{96a}\x{96b}\x{96c}\x{96d}\x{96e}\x{96f}
  1228. \= Expect no match
  1229. X
  1230. No match
  1231. /^\p{Nl}/utf
  1232. \x{16ee}
  1233. 0: \x{16ee}
  1234. \= Expect no match
  1235. X
  1236. No match
  1237. \x{966}
  1238. No match
  1239. /^\p{No}/utf
  1240. \x{b2}
  1241. 0: \x{b2}
  1242. \x{b3}
  1243. 0: \x{b3}
  1244. \= Expect no match
  1245. X
  1246. No match
  1247. \x{16ee}
  1248. No match
  1249. /^\p{Pc}/utf
  1250. \x5f
  1251. 0: _
  1252. \x{203f}
  1253. 0: \x{203f}
  1254. \= Expect no match
  1255. X
  1256. No match
  1257. -
  1258. No match
  1259. \x{58a}
  1260. No match
  1261. /^\p{Pd}/utf
  1262. -
  1263. 0: -
  1264. \x{58a}
  1265. 0: \x{58a}
  1266. \= Expect no match
  1267. X
  1268. No match
  1269. \x{203f}
  1270. No match
  1271. /^\p{Pe}/utf
  1272. )
  1273. 0: )
  1274. ]
  1275. 0: ]
  1276. }
  1277. 0: }
  1278. \x{f3b}
  1279. 0: \x{f3b}
  1280. \= Expect no match
  1281. X
  1282. No match
  1283. \x{203f}
  1284. No match
  1285. (
  1286. No match
  1287. [
  1288. No match
  1289. {
  1290. No match
  1291. \x{f3c}
  1292. No match
  1293. /^\p{Pf}/utf
  1294. \x{bb}
  1295. 0: \x{bb}
  1296. \x{2019}
  1297. 0: \x{2019}
  1298. \= Expect no match
  1299. X
  1300. No match
  1301. \x{203f}
  1302. No match
  1303. /^\p{Pi}/utf
  1304. \x{ab}
  1305. 0: \x{ab}
  1306. \x{2018}
  1307. 0: \x{2018}
  1308. \= Expect no match
  1309. X
  1310. No match
  1311. \x{203f}
  1312. No match
  1313. /^\p{Po}/utf
  1314. !
  1315. 0: !
  1316. \x{37e}
  1317. 0: \x{37e}
  1318. \= Expect no match
  1319. X
  1320. No match
  1321. \x{203f}
  1322. No match
  1323. /^\p{Ps}/utf
  1324. (
  1325. 0: (
  1326. [
  1327. 0: [
  1328. {
  1329. 0: {
  1330. \x{f3c}
  1331. 0: \x{f3c}
  1332. \= Expect no match
  1333. X
  1334. No match
  1335. )
  1336. No match
  1337. ]
  1338. No match
  1339. }
  1340. No match
  1341. \x{f3b}
  1342. No match
  1343. /^\p{Sk}/utf
  1344. \x{2c2}
  1345. 0: \x{2c2}
  1346. \= Expect no match
  1347. X
  1348. No match
  1349. \x{9f2}
  1350. No match
  1351. /^\p{Sm}+/utf
  1352. +<|~\x{ac}\x{2044}
  1353. 0: +<|~\x{ac}\x{2044}
  1354. \= Expect no match
  1355. X
  1356. No match
  1357. \x{9f2}
  1358. No match
  1359. /^\p{So}/utf
  1360. \x{a6}
  1361. 0: \x{a6}
  1362. \x{482}
  1363. 0: \x{482}
  1364. \= Expect no match
  1365. X
  1366. No match
  1367. \x{9f2}
  1368. No match
  1369. /^\p{Zl}/utf
  1370. \x{2028}
  1371. 0: \x{2028}
  1372. \= Expect no match
  1373. X
  1374. No match
  1375. \x{2029}
  1376. No match
  1377. /^\p{Zp}/utf
  1378. \x{2029}
  1379. 0: \x{2029}
  1380. \= Expect no match
  1381. X
  1382. No match
  1383. \x{2028}
  1384. No match
  1385. /\p{Nd}+(..)/utf
  1386. \x{660}\x{661}\x{662}ABC
  1387. 0: \x{660}\x{661}\x{662}AB
  1388. 1: AB
  1389. /\p{Nd}+?(..)/utf
  1390. \x{660}\x{661}\x{662}ABC
  1391. 0: \x{660}\x{661}\x{662}
  1392. 1: \x{661}\x{662}
  1393. /\p{Nd}{2,}(..)/utf
  1394. \x{660}\x{661}\x{662}ABC
  1395. 0: \x{660}\x{661}\x{662}AB
  1396. 1: AB
  1397. /\p{Nd}{2,}?(..)/utf
  1398. \x{660}\x{661}\x{662}ABC
  1399. 0: \x{660}\x{661}\x{662}A
  1400. 1: \x{662}A
  1401. /\p{Nd}*(..)/utf
  1402. \x{660}\x{661}\x{662}ABC
  1403. 0: \x{660}\x{661}\x{662}AB
  1404. 1: AB
  1405. /\p{Nd}*?(..)/utf
  1406. \x{660}\x{661}\x{662}ABC
  1407. 0: \x{660}\x{661}
  1408. 1: \x{660}\x{661}
  1409. /\p{Nd}{2}(..)/utf
  1410. \x{660}\x{661}\x{662}ABC
  1411. 0: \x{660}\x{661}\x{662}A
  1412. 1: \x{662}A
  1413. /\p{Nd}{2,3}(..)/utf
  1414. \x{660}\x{661}\x{662}ABC
  1415. 0: \x{660}\x{661}\x{662}AB
  1416. 1: AB
  1417. /\p{Nd}{2,3}?(..)/utf
  1418. \x{660}\x{661}\x{662}ABC
  1419. 0: \x{660}\x{661}\x{662}A
  1420. 1: \x{662}A
  1421. /\p{Nd}?(..)/utf
  1422. \x{660}\x{661}\x{662}ABC
  1423. 0: \x{660}\x{661}\x{662}
  1424. 1: \x{661}\x{662}
  1425. /\p{Nd}??(..)/utf
  1426. \x{660}\x{661}\x{662}ABC
  1427. 0: \x{660}\x{661}
  1428. 1: \x{660}\x{661}
  1429. /\p{Nd}*+(..)/utf
  1430. \x{660}\x{661}\x{662}ABC
  1431. 0: \x{660}\x{661}\x{662}AB
  1432. 1: AB
  1433. /\p{Nd}*+(...)/utf
  1434. \x{660}\x{661}\x{662}ABC
  1435. 0: \x{660}\x{661}\x{662}ABC
  1436. 1: ABC
  1437. /\p{Nd}*+(....)/utf
  1438. \= Expect no match
  1439. \x{660}\x{661}\x{662}ABC
  1440. No match
  1441. /(?<=A\p{Nd})XYZ/utf
  1442. A2XYZ
  1443. 0: XYZ
  1444. 123A5XYZPQR
  1445. 0: XYZ
  1446. ABA\x{660}XYZpqr
  1447. 0: XYZ
  1448. \= Expect no match
  1449. AXYZ
  1450. No match
  1451. XYZ
  1452. No match
  1453. /(?<!\pL)XYZ/utf
  1454. 1XYZ
  1455. 0: XYZ
  1456. AB=XYZ..
  1457. 0: XYZ
  1458. XYZ
  1459. 0: XYZ
  1460. \= Expect no match
  1461. WXYZ
  1462. No match
  1463. /[\P{Nd}]+/utf
  1464. abcd
  1465. 0: abcd
  1466. \= Expect no match
  1467. 1234
  1468. No match
  1469. /\D+/utf
  1470. aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  1471. 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  1472. \= Expect no match
  1473. 11111111111111111111111111111111111111111111111111111111111111111111111
  1474. No match
  1475. /\P{Nd}+/utf
  1476. aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  1477. 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  1478. \= Expect no match
  1479. 11111111111111111111111111111111111111111111111111111111111111111111111
  1480. No match
  1481. /[\D]+/utf
  1482. aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  1483. 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  1484. \= Expect no match
  1485. 11111111111111111111111111111111111111111111111111111111111111111111111
  1486. No match
  1487. /[\P{Nd}]+/utf
  1488. aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  1489. 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  1490. \= Expect no match
  1491. 11111111111111111111111111111111111111111111111111111111111111111111111
  1492. No match
  1493. /[\D\P{Nd}]+/utf
  1494. aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  1495. 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  1496. \= Expect no match
  1497. 11111111111111111111111111111111111111111111111111111111111111111111111
  1498. No match
  1499. /\pL/utf
  1500. a
  1501. 0: a
  1502. A
  1503. 0: A
  1504. /\pL/i,utf
  1505. a
  1506. 0: a
  1507. A
  1508. 0: A
  1509. /\p{Lu}/utf
  1510. A
  1511. 0: A
  1512. aZ
  1513. 0: Z
  1514. \= Expect no match
  1515. abc
  1516. No match
  1517. /\p{Ll}/utf
  1518. a
  1519. 0: a
  1520. Az
  1521. 0: z
  1522. \= Expect no match
  1523. ABC
  1524. No match
  1525. /A\x{391}\x{10427}\x{ff3a}\x{1fb0}/utf
  1526. A\x{391}\x{10427}\x{ff3a}\x{1fb0}
  1527. 0: A\x{391}\x{10427}\x{ff3a}\x{1fb0}
  1528. \= Expect no match
  1529. a\x{391}\x{10427}\x{ff3a}\x{1fb0}
  1530. No match
  1531. A\x{3b1}\x{10427}\x{ff3a}\x{1fb0}
  1532. No match
  1533. A\x{391}\x{1044F}\x{ff3a}\x{1fb0}
  1534. No match
  1535. A\x{391}\x{10427}\x{ff5a}\x{1fb0}
  1536. No match
  1537. A\x{391}\x{10427}\x{ff3a}\x{1fb8}
  1538. No match
  1539. /A\x{391}\x{10427}\x{ff3a}\x{1fb0}/i,utf
  1540. A\x{391}\x{10427}\x{ff3a}\x{1fb0}
  1541. 0: A\x{391}\x{10427}\x{ff3a}\x{1fb0}
  1542. a\x{391}\x{10427}\x{ff3a}\x{1fb0}
  1543. 0: a\x{391}\x{10427}\x{ff3a}\x{1fb0}
  1544. A\x{3b1}\x{10427}\x{ff3a}\x{1fb0}
  1545. 0: A\x{3b1}\x{10427}\x{ff3a}\x{1fb0}
  1546. A\x{391}\x{1044F}\x{ff3a}\x{1fb0}
  1547. 0: A\x{391}\x{1044f}\x{ff3a}\x{1fb0}
  1548. A\x{391}\x{10427}\x{ff5a}\x{1fb0}
  1549. 0: A\x{391}\x{10427}\x{ff5a}\x{1fb0}
  1550. A\x{391}\x{10427}\x{ff3a}\x{1fb8}
  1551. 0: A\x{391}\x{10427}\x{ff3a}\x{1fb8}
  1552. /\x{391}+/i,utf
  1553. \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}
  1554. 0: \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}
  1555. /\x{391}{3,5}(.)/i,utf
  1556. \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}X
  1557. 0: \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}X
  1558. 1: X
  1559. /\x{391}{3,5}?(.)/i,utf
  1560. \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}X
  1561. 0: \x{391}\x{3b1}\x{3b1}\x{3b1}
  1562. 1: \x{3b1}
  1563. /[\x{391}\x{ff3a}]/i,utf
  1564. \x{391}
  1565. 0: \x{391}
  1566. \x{ff3a}
  1567. 0: \x{ff3a}
  1568. \x{3b1}
  1569. 0: \x{3b1}
  1570. \x{ff5a}
  1571. 0: \x{ff5a}
  1572. /^(\X*)C/utf
  1573. A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
  1574. 0: A\x{300}\x{301}\x{302}BC
  1575. 1: A\x{300}\x{301}\x{302}B
  1576. A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
  1577. 0: A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
  1578. 1: A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
  1579. /^(\X*?)C/utf
  1580. A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
  1581. 0: A\x{300}\x{301}\x{302}BC
  1582. 1: A\x{300}\x{301}\x{302}B
  1583. A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
  1584. 0: A\x{300}\x{301}\x{302}BC
  1585. 1: A\x{300}\x{301}\x{302}B
  1586. /^(\X*)(.)/utf
  1587. A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
  1588. 0: A\x{300}\x{301}\x{302}BCA
  1589. 1: A\x{300}\x{301}\x{302}BC
  1590. 2: A
  1591. A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
  1592. 0: A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
  1593. 1: A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
  1594. 2: C
  1595. /^(\X*?)(.)/utf
  1596. A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
  1597. 0: A
  1598. 1:
  1599. 2: A
  1600. A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
  1601. 0: A
  1602. 1:
  1603. 2: A
  1604. /^\X(.)/utf
  1605. \= Expect no match
  1606. A\x{300}\x{301}\x{302}
  1607. No match
  1608. /^\X{2,3}(.)/utf
  1609. A\x{300}\x{301}B\x{300}X
  1610. 0: A\x{300}\x{301}B\x{300}X
  1611. 1: X
  1612. A\x{300}\x{301}B\x{300}C\x{300}\x{301}
  1613. 0: A\x{300}\x{301}B\x{300}C
  1614. 1: C
  1615. A\x{300}\x{301}B\x{300}C\x{300}\x{301}X
  1616. 0: A\x{300}\x{301}B\x{300}C\x{300}\x{301}X
  1617. 1: X
  1618. A\x{300}\x{301}B\x{300}C\x{300}\x{301}DA\x{300}X
  1619. 0: A\x{300}\x{301}B\x{300}C\x{300}\x{301}D
  1620. 1: D
  1621. /^\X{2,3}?(.)/utf
  1622. A\x{300}\x{301}B\x{300}X
  1623. 0: A\x{300}\x{301}B\x{300}X
  1624. 1: X
  1625. A\x{300}\x{301}B\x{300}C\x{300}\x{301}
  1626. 0: A\x{300}\x{301}B\x{300}C
  1627. 1: C
  1628. A\x{300}\x{301}B\x{300}C\x{300}\x{301}X
  1629. 0: A\x{300}\x{301}B\x{300}C
  1630. 1: C
  1631. A\x{300}\x{301}B\x{300}C\x{300}\x{301}DA\x{300}X
  1632. 0: A\x{300}\x{301}B\x{300}C
  1633. 1: C
  1634. /^\X/utf
  1635. A
  1636. 0: A
  1637. A\x{300}BC
  1638. 0: A\x{300}
  1639. A\x{300}\x{301}\x{302}BC
  1640. 0: A\x{300}\x{301}\x{302}
  1641. \x{300}
  1642. 0: \x{300}
  1643. /^\p{Han}+/utf
  1644. \x{2e81}\x{3007}\x{2f804}\x{31a0}
  1645. 0: \x{2e81}\x{3007}\x{2f804}
  1646. \= Expect no match
  1647. \x{2e7f}
  1648. No match
  1649. /^[\p{Arabic}]/utf
  1650. \x{06e9}
  1651. 0: \x{6e9}
  1652. \x{060b}
  1653. 0: \x{60b}
  1654. \= Expect no match
  1655. X\x{06e9}
  1656. No match
  1657. /^\P{Katakana}+/utf
  1658. \x{3105}
  1659. 0: \x{3105}
  1660. \= Expect no match
  1661. \x{30ff}
  1662. No match
  1663. /^[\P{Yi}]/utf
  1664. \x{2f800}
  1665. 0: \x{2f800}
  1666. \= Expect no match
  1667. \x{a014}
  1668. No match
  1669. \x{a4c6}
  1670. No match
  1671. /^\p{Any}X/utf
  1672. AXYZ
  1673. 0: AX
  1674. \x{1234}XYZ
  1675. 0: \x{1234}X
  1676. \= Expect no match
  1677. X
  1678. No match
  1679. /^\P{Any}X/utf
  1680. \= Expect no match
  1681. AX
  1682. No match
  1683. /^\p{Any}?X/utf
  1684. XYZ
  1685. 0: X
  1686. AXYZ
  1687. 0: AX
  1688. \x{1234}XYZ
  1689. 0: \x{1234}X
  1690. \= Expect no match
  1691. ABXYZ
  1692. No match
  1693. /^\P{Any}?X/utf
  1694. XYZ
  1695. 0: X
  1696. \= Expect no match
  1697. AXYZ
  1698. No match
  1699. \x{1234}XYZ
  1700. No match
  1701. ABXYZ
  1702. No match
  1703. /^\p{Any}+X/utf
  1704. AXYZ
  1705. 0: AX
  1706. \x{1234}XYZ
  1707. 0: \x{1234}X
  1708. A\x{1234}XYZ
  1709. 0: A\x{1234}X
  1710. \= Expect no match
  1711. XYZ
  1712. No match
  1713. /^\P{Any}+X/utf
  1714. \= Expect no match
  1715. AXYZ
  1716. No match
  1717. \x{1234}XYZ
  1718. No match
  1719. A\x{1234}XYZ
  1720. No match
  1721. XYZ
  1722. No match
  1723. /^\p{Any}*X/utf
  1724. XYZ
  1725. 0: X
  1726. AXYZ
  1727. 0: AX
  1728. \x{1234}XYZ
  1729. 0: \x{1234}X
  1730. A\x{1234}XYZ
  1731. 0: A\x{1234}X
  1732. /^\P{Any}*X/utf
  1733. XYZ
  1734. 0: X
  1735. \= Expect no match
  1736. AXYZ
  1737. No match
  1738. \x{1234}XYZ
  1739. No match
  1740. A\x{1234}XYZ
  1741. No match
  1742. /^[\p{Any}]X/utf
  1743. AXYZ
  1744. 0: AX
  1745. \x{1234}XYZ
  1746. 0: \x{1234}X
  1747. \= Expect no match
  1748. X
  1749. No match
  1750. /^[\P{Any}]X/utf
  1751. \= Expect no match
  1752. AX
  1753. No match
  1754. /^[\p{Any}]?X/utf
  1755. XYZ
  1756. 0: X
  1757. AXYZ
  1758. 0: AX
  1759. \x{1234}XYZ
  1760. 0: \x{1234}X
  1761. \= Expect no match
  1762. ABXYZ
  1763. No match
  1764. /^[\P{Any}]?X/utf
  1765. XYZ
  1766. 0: X
  1767. \= Expect no match
  1768. AXYZ
  1769. No match
  1770. \x{1234}XYZ
  1771. No match
  1772. ABXYZ
  1773. No match
  1774. /^[\p{Any}]+X/utf
  1775. AXYZ
  1776. 0: AX
  1777. \x{1234}XYZ
  1778. 0: \x{1234}X
  1779. A\x{1234}XYZ
  1780. 0: A\x{1234}X
  1781. \= Expect no match
  1782. XYZ
  1783. No match
  1784. /^[\P{Any}]+X/utf
  1785. \= Expect no match
  1786. AXYZ
  1787. No match
  1788. \x{1234}XYZ
  1789. No match
  1790. A\x{1234}XYZ
  1791. No match
  1792. XYZ
  1793. No match
  1794. /^[\p{Any}]*X/utf
  1795. XYZ
  1796. 0: X
  1797. AXYZ
  1798. 0: AX
  1799. \x{1234}XYZ
  1800. 0: \x{1234}X
  1801. A\x{1234}XYZ
  1802. 0: A\x{1234}X
  1803. /^[\P{Any}]*X/utf
  1804. XYZ
  1805. 0: X
  1806. \= Expect no match
  1807. AXYZ
  1808. No match
  1809. \x{1234}XYZ
  1810. No match
  1811. A\x{1234}XYZ
  1812. No match
  1813. /^\p{Any}{3,5}?/utf
  1814. abcdefgh
  1815. 0: abc
  1816. \x{1234}\n\r\x{3456}xyz
  1817. 0: \x{1234}\x{0a}\x{0d}
  1818. /^\p{Any}{3,5}/utf
  1819. abcdefgh
  1820. 0: abcde
  1821. \x{1234}\n\r\x{3456}xyz
  1822. 0: \x{1234}\x{0a}\x{0d}\x{3456}x
  1823. /^\P{Any}{3,5}?/utf
  1824. \= Expect no match
  1825. abcdefgh
  1826. No match
  1827. \x{1234}\n\r\x{3456}xyz
  1828. No match
  1829. /^\p{L&}X/utf
  1830. AXY
  1831. 0: AX
  1832. aXY
  1833. 0: aX
  1834. \x{1c5}XY
  1835. 0: \x{1c5}X
  1836. \= Expect no match
  1837. \x{1bb}XY
  1838. No match
  1839. \x{2b0}XY
  1840. No match
  1841. !XY
  1842. No match
  1843. /^[\p{L&}]X/utf
  1844. AXY
  1845. 0: AX
  1846. aXY
  1847. 0: aX
  1848. \x{1c5}XY
  1849. 0: \x{1c5}X
  1850. \= Expect no match
  1851. \x{1bb}XY
  1852. No match
  1853. \x{2b0}XY
  1854. No match
  1855. !XY
  1856. No match
  1857. /^\p{L&}+X/utf
  1858. AXY
  1859. 0: AX
  1860. aXY
  1861. 0: aX
  1862. AbcdeXyz
  1863. 0: AbcdeX
  1864. \x{1c5}AbXY
  1865. 0: \x{1c5}AbX
  1866. abcDEXypqreXlmn
  1867. 0: abcDEXypqreX
  1868. \= Expect no match
  1869. \x{1bb}XY
  1870. No match
  1871. \x{2b0}XY
  1872. No match
  1873. !XY
  1874. No match
  1875. /^[\p{L&}]+X/utf
  1876. AXY
  1877. 0: AX
  1878. aXY
  1879. 0: aX
  1880. AbcdeXyz
  1881. 0: AbcdeX
  1882. \x{1c5}AbXY
  1883. 0: \x{1c5}AbX
  1884. abcDEXypqreXlmn
  1885. 0: abcDEXypqreX
  1886. \= Expect no match
  1887. \x{1bb}XY
  1888. No match
  1889. \x{2b0}XY
  1890. No match
  1891. !XY
  1892. No match
  1893. /^\p{L&}+?X/utf
  1894. AXY
  1895. 0: AX
  1896. aXY
  1897. 0: aX
  1898. AbcdeXyz
  1899. 0: AbcdeX
  1900. \x{1c5}AbXY
  1901. 0: \x{1c5}AbX
  1902. abcDEXypqreXlmn
  1903. 0: abcDEX
  1904. \= Expect no match
  1905. \x{1bb}XY
  1906. No match
  1907. \x{2b0}XY
  1908. No match
  1909. !XY
  1910. No match
  1911. /^[\p{L&}]+?X/utf
  1912. AXY
  1913. 0: AX
  1914. aXY
  1915. 0: aX
  1916. AbcdeXyz
  1917. 0: AbcdeX
  1918. \x{1c5}AbXY
  1919. 0: \x{1c5}AbX
  1920. abcDEXypqreXlmn
  1921. 0: abcDEX
  1922. \= Expect no match
  1923. \x{1bb}XY
  1924. No match
  1925. \x{2b0}XY
  1926. No match
  1927. !XY
  1928. No match
  1929. /^\P{L&}X/utf
  1930. !XY
  1931. 0: !X
  1932. \x{1bb}XY
  1933. 0: \x{1bb}X
  1934. \x{2b0}XY
  1935. 0: \x{2b0}X
  1936. \= Expect no match
  1937. \x{1c5}XY
  1938. No match
  1939. AXY
  1940. No match
  1941. /^[\P{L&}]X/utf
  1942. !XY
  1943. 0: !X
  1944. \x{1bb}XY
  1945. 0: \x{1bb}X
  1946. \x{2b0}XY
  1947. 0: \x{2b0}X
  1948. \= Expect no match
  1949. \x{1c5}XY
  1950. No match
  1951. AXY
  1952. No match
  1953. /^(\p{Z}[^\p{C}\p{Z}]+)*$/
  1954. \xa0!
  1955. 0: \xa0!
  1956. 1: \xa0!
  1957. /^[\pL](abc)(?1)/
  1958. AabcabcYZ
  1959. 0: Aabcabc
  1960. 1: abc
  1961. /([\pL]=(abc))*X/
  1962. L=abcX
  1963. 0: L=abcX
  1964. 1: L=abc
  1965. 2: abc
  1966. /^\p{Balinese}\p{Cuneiform}\p{Nko}\p{Phags_Pa}\p{Phoenician}/utf
  1967. \x{1b00}\x{12000}\x{7c0}\x{a840}\x{10900}
  1968. 0: \x{1b00}\x{12000}\x{7c0}\x{a840}\x{10900}
  1969. # Check property support in non-UTF mode
  1970. /\p{L}{4}/
  1971. 123abcdefg
  1972. 0: abcd
  1973. 123abc\xc4\xc5zz
  1974. 0: abc\xc4
  1975. /\X{1,3}\d/
  1976. \= Expect no match
  1977. \x8aBCD
  1978. No match
  1979. /\X?\d/
  1980. \= Expect no match
  1981. \x8aBCD
  1982. No match
  1983. /\P{L}?\d/
  1984. \= Expect no match
  1985. \x8aBCD
  1986. No match
  1987. /[\PPP\x8a]{1,}\x80/
  1988. A\x80
  1989. 0: A\x80
  1990. /^[\p{Arabic}]/utf
  1991. \x{604}
  1992. 0: \x{604}
  1993. \x{60e}
  1994. 0: \x{60e}
  1995. \x{656}
  1996. 0: \x{656}
  1997. \x{657}
  1998. 0: \x{657}
  1999. \x{658}
  2000. 0: \x{658}
  2001. \x{659}
  2002. 0: \x{659}
  2003. \x{65a}
  2004. 0: \x{65a}
  2005. \x{65b}
  2006. 0: \x{65b}
  2007. \x{65c}
  2008. 0: \x{65c}
  2009. \x{65d}
  2010. 0: \x{65d}
  2011. \x{65e}
  2012. 0: \x{65e}
  2013. \x{65f}
  2014. 0: \x{65f}
  2015. \x{66a}
  2016. 0: \x{66a}
  2017. \x{6e9}
  2018. 0: \x{6e9}
  2019. \x{6ef}
  2020. 0: \x{6ef}
  2021. \x{6fa}
  2022. 0: \x{6fa}
  2023. /^\p{Cyrillic}/utf
  2024. \x{1d2b}
  2025. 0: \x{1d2b}
  2026. /^\p{Common}/utf
  2027. \x{2116}
  2028. 0: \x{2116}
  2029. \x{1D183}
  2030. 0: \x{1d183}
  2031. /^\p{Inherited}/utf
  2032. \x{200c}
  2033. 0: \x{200c}
  2034. \= Expect no match
  2035. \x{64a}
  2036. No match
  2037. \x{656}
  2038. No match
  2039. /^\p{Shavian}/utf
  2040. \x{10450}
  2041. 0: \x{10450}
  2042. \x{1047f}
  2043. 0: \x{1047f}
  2044. /^\p{Deseret}/utf
  2045. \x{10400}
  2046. 0: \x{10400}
  2047. \x{1044f}
  2048. 0: \x{1044f}
  2049. /^\p{Osmanya}/utf
  2050. \x{10480}
  2051. 0: \x{10480}
  2052. \x{1049d}
  2053. 0: \x{1049d}
  2054. \x{104a0}
  2055. 0: \x{104a0}
  2056. \x{104a9}
  2057. 0: \x{104a9}
  2058. \= Expect no match
  2059. \x{1049e}
  2060. No match
  2061. \x{1049f}
  2062. No match
  2063. \x{104aa}
  2064. No match
  2065. /\p{katakana}/utf
  2066. \x{30a1}
  2067. 0: \x{30a1}
  2068. \x{3001}
  2069. 0: \x{3001}
  2070. /\p{scx:katakana}/utf
  2071. \x{30a1}
  2072. 0: \x{30a1}
  2073. \x{3001}
  2074. 0: \x{3001}
  2075. /\p{script extensions:katakana}/utf
  2076. \x{30a1}
  2077. 0: \x{30a1}
  2078. \x{3001}
  2079. 0: \x{3001}
  2080. /\p{sc:katakana}/utf
  2081. \x{30a1}
  2082. 0: \x{30a1}
  2083. \= Expect no match
  2084. \x{3001}
  2085. No match
  2086. /\p{script:katakana}/utf
  2087. \x{30a1}
  2088. 0: \x{30a1}
  2089. \= Expect no match
  2090. \x{3001}
  2091. No match
  2092. /\p{sc:katakana}{3,}/utf
  2093. \x{30a1}\x{30fa}\x{32d0}\x{1b122}\x{ff66}\x{3001}ABC
  2094. 0: \x{30a1}\x{30fa}\x{32d0}\x{1b122}\x{ff66}
  2095. /\p{sc:katakana}{3,}?/utf
  2096. \x{30a1}\x{30fa}\x{32d0}\x{1b122}\x{ff66}\x{3001}ABC
  2097. 0: \x{30a1}\x{30fa}\x{32d0}
  2098. /\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
  2099. \x{102A4}\x{AA52}\x{A91D}\x{1C46}\x{10283}\x{1092E}\x{1C6B}\x{A93B}\x{A8BF}\x{1BA0}\x{A50A}====
  2100. 0: \x{102a4}\x{aa52}\x{a91d}\x{1c46}\x{10283}\x{1092e}\x{1c6b}\x{a93b}\x{a8bf}\x{1ba0}\x{a50a}
  2101. /\x{a77d}\x{1d79}/i,utf
  2102. \x{a77d}\x{1d79}
  2103. 0: \x{a77d}\x{1d79}
  2104. \x{1d79}\x{a77d}
  2105. 0: \x{1d79}\x{a77d}
  2106. /\x{a77d}\x{1d79}/utf
  2107. \x{a77d}\x{1d79}
  2108. 0: \x{a77d}\x{1d79}
  2109. \= Expect no match
  2110. \x{1d79}\x{a77d}
  2111. No match
  2112. /(A)\1/i,utf
  2113. AA
  2114. 0: AA
  2115. 1: A
  2116. Aa
  2117. 0: Aa
  2118. 1: A
  2119. aa
  2120. 0: aa
  2121. 1: a
  2122. aA
  2123. 0: aA
  2124. 1: a
  2125. /(\x{10a})\1/i,utf
  2126. \x{10a}\x{10a}
  2127. 0: \x{10a}\x{10a}
  2128. 1: \x{10a}
  2129. \x{10a}\x{10b}
  2130. 0: \x{10a}\x{10b}
  2131. 1: \x{10a}
  2132. \x{10b}\x{10b}
  2133. 0: \x{10b}\x{10b}
  2134. 1: \x{10b}
  2135. \x{10b}\x{10a}
  2136. 0: \x{10b}\x{10a}
  2137. 1: \x{10b}
  2138. # The next two tests are for property support in non-UTF mode
  2139. /(?:\p{Lu}|\x20)+/
  2140. \x41\x20\x50\xC2\x54\xC9\x20\x54\x4F\x44\x41\x59
  2141. 0: A P\xc2T\xc9 TODAY
  2142. /[\p{Lu}\x20]+/
  2143. \x41\x20\x50\xC2\x54\xC9\x20\x54\x4F\x44\x41\x59
  2144. 0: A P\xc2T\xc9 TODAY
  2145. /\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
  2146. \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}
  2147. 0: \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{800}\x{1aad}\x{aac0}
  2148. /^\w+/utf,ucp
  2149. Az_\x{aa}\x{c0}\x{1c5}\x{2b0}\x{3b6}\x{1d7c9}\x{2fa1d}1\x{660}\x{bef}\x{16ee}
  2150. 0: Az_\x{aa}\x{c0}\x{1c5}\x{2b0}\x{3b6}\x{1d7c9}\x{2fa1d}1\x{660}\x{bef}\x{16ee}
  2151. /^[[:xdigit:]]*/utf,ucp
  2152. 1a\x{660}\x{bef}\x{16ee}
  2153. 0: 1a
  2154. /^\d+/utf,ucp
  2155. 1\x{660}\x{bef}\x{16ee}
  2156. 0: 1\x{660}\x{bef}
  2157. /^[[:digit:]]+/utf,ucp
  2158. 1\x{660}\x{bef}\x{16ee}
  2159. 0: 1\x{660}\x{bef}
  2160. /^>\s+/utf,ucp
  2161. >\x{20}\x{a0}\x{1680}\x{2028}\x{2029}\x{202f}\x{9}\x{b}
  2162. 0: > \x{a0}\x{1680}\x{2028}\x{2029}\x{202f}\x{09}\x{0b}
  2163. /^>\pZ+/utf,ucp
  2164. >\x{20}\x{a0}\x{1680}\x{2028}\x{2029}\x{202f}\x{9}\x{b}
  2165. 0: > \x{a0}\x{1680}\x{2028}\x{2029}\x{202f}
  2166. /^>[[:space:]]*/utf,ucp
  2167. >\x{20}\x{a0}\x{1680}\x{2028}\x{2029}\x{202f}\x{9}\x{b}
  2168. 0: > \x{a0}\x{1680}\x{2028}\x{2029}\x{202f}\x{09}\x{0b}
  2169. /^>[[:blank:]]*/utf,ucp
  2170. >\x{20}\x{a0}\x{1680}\x{2000}\x{202f}\x{9}\x{b}\x{2028}
  2171. 0: > \x{a0}\x{1680}\x{2000}\x{202f}\x{09}
  2172. /^[[:alpha:]]*/utf,ucp
  2173. Az\x{aa}\x{c0}\x{1c5}\x{2b0}\x{3b6}\x{1d7c9}\x{2fa1d}
  2174. 0: Az\x{aa}\x{c0}\x{1c5}\x{2b0}\x{3b6}\x{1d7c9}\x{2fa1d}
  2175. /^[[:alnum:]]*/utf,ucp
  2176. Az\x{aa}\x{c0}\x{1c5}\x{2b0}\x{3b6}\x{1d7c9}\x{2fa1d}1\x{660}\x{bef}\x{16ee}
  2177. 0: Az\x{aa}\x{c0}\x{1c5}\x{2b0}\x{3b6}\x{1d7c9}\x{2fa1d}1\x{660}\x{bef}\x{16ee}
  2178. /^[[:cntrl:]]*/utf,ucp
  2179. \x{0}\x{09}\x{1f}\x{7f}\x{9f}
  2180. 0: \x{00}\x{09}\x{1f}\x{7f}\x{9f}
  2181. /^[[:graph:]]*/utf,ucp
  2182. A\x{a1}\x{a0}
  2183. 0: A\x{a1}
  2184. /^[[:print:]]*/utf,ucp
  2185. A z\x{a0}\x{a1}
  2186. 0: A z\x{a0}\x{a1}
  2187. /^[[:punct:]]*/utf,ucp
  2188. .+\x{a1}\x{a0}
  2189. 0: .+\x{a1}
  2190. /\p{Zs}*?\R/
  2191. \= Expect no match
  2192. a\xFCb
  2193. No match
  2194. /\p{Zs}*\R/
  2195. \= Expect no match
  2196. a\xFCb
  2197. No match
  2198. /ⱥ/i,utf
  2199. 0: \x{2c65}
  2200. Ⱥx
  2201. 0: \x{23a}
  2202. Ⱥ
  2203. 0: \x{23a}
  2204. /[ⱥ]/i,utf
  2205. 0: \x{2c65}
  2206. Ⱥx
  2207. 0: \x{23a}
  2208. Ⱥ
  2209. 0: \x{23a}
  2210. /Ⱥ/i,utf
  2211. Ⱥ
  2212. 0: \x{23a}
  2213. 0: \x{2c65}
  2214. # These are tests for extended grapheme clusters
  2215. /^\X/utf,aftertext
  2216. G\x{34e}\x{34e}X
  2217. 0: G\x{34e}\x{34e}
  2218. 0+ X
  2219. \x{34e}\x{34e}X
  2220. 0: \x{34e}\x{34e}
  2221. 0+ X
  2222. \x04X
  2223. 0: \x{04}
  2224. 0+ X
  2225. \x{1100}X
  2226. 0: \x{1100}
  2227. 0+ X
  2228. \x{1100}\x{34e}X
  2229. 0: \x{1100}\x{34e}
  2230. 0+ X
  2231. \x{1b04}\x{1b04}X
  2232. 0: \x{1b04}\x{1b04}
  2233. 0+ X
  2234. *These match up to the roman letters
  2235. 0: *
  2236. 0+ These match up to the roman letters
  2237. \x{1111}\x{1111}L,L
  2238. 0: \x{1111}\x{1111}
  2239. 0+ L,L
  2240. \x{1111}\x{1111}\x{1169}L,L,V
  2241. 0: \x{1111}\x{1111}\x{1169}
  2242. 0+ L,L,V
  2243. \x{1111}\x{ae4c}L, LV
  2244. 0: \x{1111}\x{ae4c}
  2245. 0+ L, LV
  2246. \x{1111}\x{ad89}L, LVT
  2247. 0: \x{1111}\x{ad89}
  2248. 0+ L, LVT
  2249. \x{1111}\x{ae4c}\x{1169}L, LV, V
  2250. 0: \x{1111}\x{ae4c}\x{1169}
  2251. 0+ L, LV, V
  2252. \x{1111}\x{ae4c}\x{1169}\x{1169}L, LV, V, V
  2253. 0: \x{1111}\x{ae4c}\x{1169}\x{1169}
  2254. 0+ L, LV, V, V
  2255. \x{1111}\x{ae4c}\x{1169}\x{11fe}L, LV, V, T
  2256. 0: \x{1111}\x{ae4c}\x{1169}\x{11fe}
  2257. 0+ L, LV, V, T
  2258. \x{1111}\x{ad89}\x{11fe}L, LVT, T
  2259. 0: \x{1111}\x{ad89}\x{11fe}
  2260. 0+ L, LVT, T
  2261. \x{1111}\x{ad89}\x{11fe}\x{11fe}L, LVT, T, T
  2262. 0: \x{1111}\x{ad89}\x{11fe}\x{11fe}
  2263. 0+ L, LVT, T, T
  2264. \x{ad89}\x{11fe}\x{11fe}LVT, T, T
  2265. 0: \x{ad89}\x{11fe}\x{11fe}
  2266. 0+ LVT, T, T
  2267. *These match just the first codepoint (invalid sequence)
  2268. 0: *
  2269. 0+ These match just the first codepoint (invalid sequence)
  2270. \x{1111}\x{11fe}L, T
  2271. 0: \x{1111}
  2272. 0+ \x{11fe}L, T
  2273. \x{ae4c}\x{1111}LV, L
  2274. 0: \x{ae4c}
  2275. 0+ \x{1111}LV, L
  2276. \x{ae4c}\x{ae4c}LV, LV
  2277. 0: \x{ae4c}
  2278. 0+ \x{ae4c}LV, LV
  2279. \x{ae4c}\x{ad89}LV, LVT
  2280. 0: \x{ae4c}
  2281. 0+ \x{ad89}LV, LVT
  2282. \x{1169}\x{1111}V, L
  2283. 0: \x{1169}
  2284. 0+ \x{1111}V, L
  2285. \x{1169}\x{ae4c}V, LV
  2286. 0: \x{1169}
  2287. 0+ \x{ae4c}V, LV
  2288. \x{1169}\x{ad89}V, LVT
  2289. 0: \x{1169}
  2290. 0+ \x{ad89}V, LVT
  2291. \x{ad89}\x{1111}LVT, L
  2292. 0: \x{ad89}
  2293. 0+ \x{1111}LVT, L
  2294. \x{ad89}\x{1169}LVT, V
  2295. 0: \x{ad89}
  2296. 0+ \x{1169}LVT, V
  2297. \x{ad89}\x{ae4c}LVT, LV
  2298. 0: \x{ad89}
  2299. 0+ \x{ae4c}LVT, LV
  2300. \x{ad89}\x{ad89}LVT, LVT
  2301. 0: \x{ad89}
  2302. 0+ \x{ad89}LVT, LVT
  2303. \x{11fe}\x{1111}T, L
  2304. 0: \x{11fe}
  2305. 0+ \x{1111}T, L
  2306. \x{11fe}\x{1169}T, V
  2307. 0: \x{11fe}
  2308. 0+ \x{1169}T, V
  2309. \x{11fe}\x{ae4c}T, LV
  2310. 0: \x{11fe}
  2311. 0+ \x{ae4c}T, LV
  2312. \x{11fe}\x{ad89}T, LVT
  2313. 0: \x{11fe}
  2314. 0+ \x{ad89}T, LVT
  2315. *Test extend and spacing mark
  2316. 0: *
  2317. 0+ Test extend and spacing mark
  2318. \x{1111}\x{ae4c}\x{0711}L, LV, extend
  2319. 0: \x{1111}\x{ae4c}\x{711}
  2320. 0+ L, LV, extend
  2321. \x{1111}\x{ae4c}\x{1b04}L, LV, spacing mark
  2322. 0: \x{1111}\x{ae4c}\x{1b04}
  2323. 0+ L, LV, spacing mark
  2324. \x{1111}\x{ae4c}\x{1b04}\x{0711}\x{1b04}L, LV, spacing mark, extend, spacing mark
  2325. 0: \x{1111}\x{ae4c}\x{1b04}\x{711}\x{1b04}
  2326. 0+ L, LV, spacing mark, extend, spacing mark
  2327. *Test CR, LF, and control
  2328. 0: *
  2329. 0+ Test CR, LF, and control
  2330. \x0d\x{0711}CR, extend
  2331. 0: \x{0d}
  2332. 0+ \x{711}CR, extend
  2333. \x0d\x{1b04}CR, spacingmark
  2334. 0: \x{0d}
  2335. 0+ \x{1b04}CR, spacingmark
  2336. \x0a\x{0711}LF, extend
  2337. 0: \x{0a}
  2338. 0+ \x{711}LF, extend
  2339. \x0a\x{1b04}LF, spacingmark
  2340. 0: \x{0a}
  2341. 0+ \x{1b04}LF, spacingmark
  2342. \x0b\x{0711}Control, extend
  2343. 0: \x{0b}
  2344. 0+ \x{711}Control, extend
  2345. \x09\x{1b04}Control, spacingmark
  2346. 0: \x{09}
  2347. 0+ \x{1b04}Control, spacingmark
  2348. *Test Extended Pictographic after bug fix
  2349. 0: *
  2350. 0+ Test Extended Pictographic after bug fix
  2351. \x{261d}\x{261d}B Extended_Pictographic Extended_Pictographic
  2352. 0: \x{261d}
  2353. 0+ \x{261d}B Extended_Pictographic Extended_Pictographic
  2354. \x{261D}\x{1F3FB}\x{261d}B Extended_Pictographic Extend E-P
  2355. 0: \x{261d}\x{1f3fb}
  2356. 0+ \x{261d}B Extended_Pictographic Extend E-P
  2357. \x{261D}\x{1F3FB}\x{200d}\x{261d}B Extended_Pictographic Extend ZWJ E-P
  2358. 0: \x{261d}\x{1f3fb}\x{200d}\x{261d}
  2359. 0+ B Extended_Pictographic Extend ZWJ E-P
  2360. \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}
  2361. 0: \x{1f3f3}\x{fe0f}\x{200d}\x{1f308}
  2362. 0+ \x{1f3f4}\x{200d}\x{2620}\x{fe0f}\x{1f3f3}\x{fe0f}\x{200d}\x{1f308}\x{1f3f4}\x{200d}\x{2620}\x{fe0f}
  2363. A\x{200d}\x{1f308}B
  2364. 0: A\x{200d}
  2365. 0+ \x{1f308}B
  2366. A\x{200d}B A ZWJ
  2367. 0: A\x{200d}
  2368. 0+ B A ZWJ
  2369. \x{261D}\x{1F3FB}B Extended_Pictographic Extend
  2370. 0: \x{261d}\x{1f3fb}
  2371. 0+ B Extended_Pictographic Extend
  2372. \x{1F1E6}\x{1F1E7}B RegionalIndicator RegionalIndicator
  2373. 0: \x{1f1e6}\x{1f1e7}
  2374. 0+ B RegionalIndicator RegionalIndicator
  2375. *There are no Prepend characters, so we can't test Prepend, CR
  2376. 0: *
  2377. 0+ There are no Prepend characters, so we can't test Prepend, CR
  2378. /^(?>\X{2})X/utf,aftertext
  2379. \x{1111}\x{ae4c}\x{1111}\x{ae4c}X
  2380. 0: \x{1111}\x{ae4c}\x{1111}\x{ae4c}X
  2381. 0+
  2382. /^\X{2,4}X/utf,aftertext
  2383. \x{1111}\x{ae4c}\x{1111}\x{ae4c}X
  2384. 0: \x{1111}\x{ae4c}\x{1111}\x{ae4c}X
  2385. 0+
  2386. \x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}X
  2387. 0: \x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}X
  2388. 0+
  2389. \x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}X
  2390. 0: \x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}X
  2391. 0+
  2392. /^\X{2,4}?X/utf,aftertext
  2393. \x{1111}\x{ae4c}\x{1111}\x{ae4c}X
  2394. 0: \x{1111}\x{ae4c}\x{1111}\x{ae4c}X
  2395. 0+
  2396. \x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}X
  2397. 0: \x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}X
  2398. 0+
  2399. \x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}X
  2400. 0: \x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}\x{1111}\x{ae4c}X
  2401. 0+
  2402. /\X*Z/utf,no_start_optimize
  2403. \= Expect no match
  2404. A\x{300}
  2405. No match
  2406. /\X*(.)/utf,no_start_optimize
  2407. A\x{1111}\x{ae4c}\x{1169}
  2408. 0: A\x{1111}
  2409. 1: \x{1111}
  2410. # --------------------------------------------
  2411. /\x{1e9e}+/i,utf
  2412. \x{1e9e}\x{00df}
  2413. 0: \x{1e9e}\x{df}
  2414. /[z\x{1e9e}]+/i,utf
  2415. \x{1e9e}\x{00df}
  2416. 0: \x{1e9e}\x{df}
  2417. /\x{00df}+/i,utf
  2418. \x{1e9e}\x{00df}
  2419. 0: \x{1e9e}\x{df}
  2420. /[z\x{00df}]+/i,utf
  2421. \x{1e9e}\x{00df}
  2422. 0: \x{1e9e}\x{df}
  2423. /\x{1f88}+/i,utf
  2424. \x{1f88}\x{1f80}
  2425. 0: \x{1f88}\x{1f80}
  2426. /[z\x{1f88}]+/i,utf
  2427. \x{1f88}\x{1f80}
  2428. 0: \x{1f88}\x{1f80}
  2429. # Check a reference with more than one other case
  2430. /^(\x{00b5})\1{2}$/i,utf
  2431. \x{00b5}\x{039c}\x{03bc}
  2432. 0: \x{b5}\x{39c}\x{3bc}
  2433. 1: \x{b5}
  2434. # Characters with more than one other case; test in classes
  2435. /[z\x{00b5}]+/i,utf
  2436. \x{00b5}\x{039c}\x{03bc}
  2437. 0: \x{b5}\x{39c}\x{3bc}
  2438. /[z\x{039c}]+/i,utf
  2439. \x{00b5}\x{039c}\x{03bc}
  2440. 0: \x{b5}\x{39c}\x{3bc}
  2441. /[z\x{03bc}]+/i,utf
  2442. \x{00b5}\x{039c}\x{03bc}
  2443. 0: \x{b5}\x{39c}\x{3bc}
  2444. /[z\x{00c5}]+/i,utf
  2445. \x{00c5}\x{00e5}\x{212b}
  2446. 0: \x{c5}\x{e5}\x{212b}
  2447. /[z\x{00e5}]+/i,utf
  2448. \x{00c5}\x{00e5}\x{212b}
  2449. 0: \x{c5}\x{e5}\x{212b}
  2450. /[z\x{212b}]+/i,utf
  2451. \x{00c5}\x{00e5}\x{212b}
  2452. 0: \x{c5}\x{e5}\x{212b}
  2453. /[z\x{01c4}]+/i,utf
  2454. \x{01c4}\x{01c5}\x{01c6}
  2455. 0: \x{1c4}\x{1c5}\x{1c6}
  2456. /[z\x{01c5}]+/i,utf
  2457. \x{01c4}\x{01c5}\x{01c6}
  2458. 0: \x{1c4}\x{1c5}\x{1c6}
  2459. /[z\x{01c6}]+/i,utf
  2460. \x{01c4}\x{01c5}\x{01c6}
  2461. 0: \x{1c4}\x{1c5}\x{1c6}
  2462. /[z\x{01c7}]+/i,utf
  2463. \x{01c7}\x{01c8}\x{01c9}
  2464. 0: \x{1c7}\x{1c8}\x{1c9}
  2465. /[z\x{01c8}]+/i,utf
  2466. \x{01c7}\x{01c8}\x{01c9}
  2467. 0: \x{1c7}\x{1c8}\x{1c9}
  2468. /[z\x{01c9}]+/i,utf
  2469. \x{01c7}\x{01c8}\x{01c9}
  2470. 0: \x{1c7}\x{1c8}\x{1c9}
  2471. /[z\x{01ca}]+/i,utf
  2472. \x{01ca}\x{01cb}\x{01cc}
  2473. 0: \x{1ca}\x{1cb}\x{1cc}
  2474. /[z\x{01cb}]+/i,utf
  2475. \x{01ca}\x{01cb}\x{01cc}
  2476. 0: \x{1ca}\x{1cb}\x{1cc}
  2477. /[z\x{01cc}]+/i,utf
  2478. \x{01ca}\x{01cb}\x{01cc}
  2479. 0: \x{1ca}\x{1cb}\x{1cc}
  2480. /[z\x{01f1}]+/i,utf
  2481. \x{01f1}\x{01f2}\x{01f3}
  2482. 0: \x{1f1}\x{1f2}\x{1f3}
  2483. /[z\x{01f2}]+/i,utf
  2484. \x{01f1}\x{01f2}\x{01f3}
  2485. 0: \x{1f1}\x{1f2}\x{1f3}
  2486. /[z\x{01f3}]+/i,utf
  2487. \x{01f1}\x{01f2}\x{01f3}
  2488. 0: \x{1f1}\x{1f2}\x{1f3}
  2489. /[z\x{0345}]+/i,utf
  2490. \x{0345}\x{0399}\x{03b9}\x{1fbe}
  2491. 0: \x{345}\x{399}\x{3b9}\x{1fbe}
  2492. /[z\x{0399}]+/i,utf
  2493. \x{0345}\x{0399}\x{03b9}\x{1fbe}
  2494. 0: \x{345}\x{399}\x{3b9}\x{1fbe}
  2495. /[z\x{03b9}]+/i,utf
  2496. \x{0345}\x{0399}\x{03b9}\x{1fbe}
  2497. 0: \x{345}\x{399}\x{3b9}\x{1fbe}
  2498. /[z\x{1fbe}]+/i,utf
  2499. \x{0345}\x{0399}\x{03b9}\x{1fbe}
  2500. 0: \x{345}\x{399}\x{3b9}\x{1fbe}
  2501. /[z\x{0392}]+/i,utf
  2502. \x{0392}\x{03b2}\x{03d0}
  2503. 0: \x{392}\x{3b2}\x{3d0}
  2504. /[z\x{03b2}]+/i,utf
  2505. \x{0392}\x{03b2}\x{03d0}
  2506. 0: \x{392}\x{3b2}\x{3d0}
  2507. /[z\x{03d0}]+/i,utf
  2508. \x{0392}\x{03b2}\x{03d0}
  2509. 0: \x{392}\x{3b2}\x{3d0}
  2510. /[z\x{0395}]+/i,utf
  2511. \x{0395}\x{03b5}\x{03f5}
  2512. 0: \x{395}\x{3b5}\x{3f5}
  2513. /[z\x{03b5}]+/i,utf
  2514. \x{0395}\x{03b5}\x{03f5}
  2515. 0: \x{395}\x{3b5}\x{3f5}
  2516. /[z\x{03f5}]+/i,utf
  2517. \x{0395}\x{03b5}\x{03f5}
  2518. 0: \x{395}\x{3b5}\x{3f5}
  2519. /[z\x{0398}]+/i,utf
  2520. \x{0398}\x{03b8}\x{03d1}\x{03f4}
  2521. 0: \x{398}\x{3b8}\x{3d1}\x{3f4}
  2522. /[z\x{03b8}]+/i,utf
  2523. \x{0398}\x{03b8}\x{03d1}\x{03f4}
  2524. 0: \x{398}\x{3b8}\x{3d1}\x{3f4}
  2525. /[z\x{03d1}]+/i,utf
  2526. \x{0398}\x{03b8}\x{03d1}\x{03f4}
  2527. 0: \x{398}\x{3b8}\x{3d1}\x{3f4}
  2528. /[z\x{03f4}]+/i,utf
  2529. \x{0398}\x{03b8}\x{03d1}\x{03f4}
  2530. 0: \x{398}\x{3b8}\x{3d1}\x{3f4}
  2531. /[z\x{039a}]+/i,utf
  2532. \x{039a}\x{03ba}\x{03f0}
  2533. 0: \x{39a}\x{3ba}\x{3f0}
  2534. /[z\x{03ba}]+/i,utf
  2535. \x{039a}\x{03ba}\x{03f0}
  2536. 0: \x{39a}\x{3ba}\x{3f0}
  2537. /[z\x{03f0}]+/i,utf
  2538. \x{039a}\x{03ba}\x{03f0}
  2539. 0: \x{39a}\x{3ba}\x{3f0}
  2540. /[z\x{03a0}]+/i,utf
  2541. \x{03a0}\x{03c0}\x{03d6}
  2542. 0: \x{3a0}\x{3c0}\x{3d6}
  2543. /[z\x{03c0}]+/i,utf
  2544. \x{03a0}\x{03c0}\x{03d6}
  2545. 0: \x{3a0}\x{3c0}\x{3d6}
  2546. /[z\x{03d6}]+/i,utf
  2547. \x{03a0}\x{03c0}\x{03d6}
  2548. 0: \x{3a0}\x{3c0}\x{3d6}
  2549. /[z\x{03a1}]+/i,utf
  2550. \x{03a1}\x{03c1}\x{03f1}
  2551. 0: \x{3a1}\x{3c1}\x{3f1}
  2552. /[z\x{03c1}]+/i,utf
  2553. \x{03a1}\x{03c1}\x{03f1}
  2554. 0: \x{3a1}\x{3c1}\x{3f1}
  2555. /[z\x{03f1}]+/i,utf
  2556. \x{03a1}\x{03c1}\x{03f1}
  2557. 0: \x{3a1}\x{3c1}\x{3f1}
  2558. /[z\x{03a3}]+/i,utf
  2559. \x{03A3}\x{03C2}\x{03C3}
  2560. 0: \x{3a3}\x{3c2}\x{3c3}
  2561. /[z\x{03c2}]+/i,utf
  2562. \x{03A3}\x{03C2}\x{03C3}
  2563. 0: \x{3a3}\x{3c2}\x{3c3}
  2564. /[z\x{03c3}]+/i,utf
  2565. \x{03A3}\x{03C2}\x{03C3}
  2566. 0: \x{3a3}\x{3c2}\x{3c3}
  2567. /[z\x{03a6}]+/i,utf
  2568. \x{03a6}\x{03c6}\x{03d5}
  2569. 0: \x{3a6}\x{3c6}\x{3d5}
  2570. /[z\x{03c6}]+/i,utf
  2571. \x{03a6}\x{03c6}\x{03d5}
  2572. 0: \x{3a6}\x{3c6}\x{3d5}
  2573. /[z\x{03d5}]+/i,utf
  2574. \x{03a6}\x{03c6}\x{03d5}
  2575. 0: \x{3a6}\x{3c6}\x{3d5}
  2576. /[z\x{03c9}]+/i,utf
  2577. \x{03c9}\x{03a9}\x{2126}
  2578. 0: \x{3c9}\x{3a9}\x{2126}
  2579. /[z\x{03a9}]+/i,utf
  2580. \x{03c9}\x{03a9}\x{2126}
  2581. 0: \x{3c9}\x{3a9}\x{2126}
  2582. /[z\x{2126}]+/i,utf
  2583. \x{03c9}\x{03a9}\x{2126}
  2584. 0: \x{3c9}\x{3a9}\x{2126}
  2585. /[z\x{1e60}]+/i,utf
  2586. \x{1e60}\x{1e61}\x{1e9b}
  2587. 0: \x{1e60}\x{1e61}\x{1e9b}
  2588. /[z\x{1e61}]+/i,utf
  2589. \x{1e60}\x{1e61}\x{1e9b}
  2590. 0: \x{1e60}\x{1e61}\x{1e9b}
  2591. /[z\x{1e9b}]+/i,utf
  2592. \x{1e60}\x{1e61}\x{1e9b}
  2593. 0: \x{1e60}\x{1e61}\x{1e9b}
  2594. # Perl 5.12.4 gets these wrong, but 5.15.3 is OK
  2595. /[z\x{004b}]+/i,utf
  2596. \x{004b}\x{006b}\x{212a}
  2597. 0: Kk\x{212a}
  2598. /[z\x{006b}]+/i,utf
  2599. \x{004b}\x{006b}\x{212a}
  2600. 0: Kk\x{212a}
  2601. /[z\x{212a}]+/i,utf
  2602. \x{004b}\x{006b}\x{212a}
  2603. 0: Kk\x{212a}
  2604. /[z\x{0053}]+/i,utf
  2605. \x{0053}\x{0073}\x{017f}
  2606. 0: Ss\x{17f}
  2607. /[z\x{0073}]+/i,utf
  2608. \x{0053}\x{0073}\x{017f}
  2609. 0: Ss\x{17f}
  2610. /[z\x{017f}]+/i,utf
  2611. \x{0053}\x{0073}\x{017f}
  2612. 0: Ss\x{17f}
  2613. # --------------------------------------
  2614. /(ΣΆΜΟΣ) \1/i,utf
  2615. ΣΆΜΟΣ ΣΆΜΟΣ
  2616. 0: \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3} \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3}
  2617. 1: \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3}
  2618. ΣΆΜΟΣ σάμος
  2619. 0: \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3} \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2}
  2620. 1: \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3}
  2621. σάμος σάμος
  2622. 0: \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2} \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2}
  2623. 1: \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2}
  2624. σάμος σάμοσ
  2625. 0: \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2} \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c3}
  2626. 1: \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2}
  2627. σάμος ΣΆΜΟΣ
  2628. 0: \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2} \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3}
  2629. 1: \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2}
  2630. /(σάμος) \1/i,utf
  2631. ΣΆΜΟΣ ΣΆΜΟΣ
  2632. 0: \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3} \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3}
  2633. 1: \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3}
  2634. ΣΆΜΟΣ σάμος
  2635. 0: \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3} \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2}
  2636. 1: \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3}
  2637. σάμος σάμος
  2638. 0: \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2} \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2}
  2639. 1: \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2}
  2640. σάμος σάμοσ
  2641. 0: \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2} \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c3}
  2642. 1: \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2}
  2643. σάμος ΣΆΜΟΣ
  2644. 0: \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2} \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3}
  2645. 1: \x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2}
  2646. /(ΣΆΜΟΣ) \1*/i,utf
  2647. ΣΆΜΟΣ\x20
  2648. 0: \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3}
  2649. 1: \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3}
  2650. ΣΆΜΟΣ ΣΆΜΟΣσάμοςσάμος
  2651. 0: \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3} \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3}\x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2}\x{3c3}\x{3ac}\x{3bc}\x{3bf}\x{3c2}
  2652. 1: \x{3a3}\x{386}\x{39c}\x{39f}\x{3a3}
  2653. # Perl matches these
  2654. /\x{00b5}+/i,utf
  2655. \x{00b5}\x{039c}\x{03bc}
  2656. 0: \x{b5}\x{39c}\x{3bc}
  2657. /\x{039c}+/i,utf
  2658. \x{00b5}\x{039c}\x{03bc}
  2659. 0: \x{b5}\x{39c}\x{3bc}
  2660. /\x{03bc}+/i,utf
  2661. \x{00b5}\x{039c}\x{03bc}
  2662. 0: \x{b5}\x{39c}\x{3bc}
  2663. /\x{00c5}+/i,utf
  2664. \x{00c5}\x{00e5}\x{212b}
  2665. 0: \x{c5}\x{e5}\x{212b}
  2666. /\x{00e5}+/i,utf
  2667. \x{00c5}\x{00e5}\x{212b}
  2668. 0: \x{c5}\x{e5}\x{212b}
  2669. /\x{212b}+/i,utf
  2670. \x{00c5}\x{00e5}\x{212b}
  2671. 0: \x{c5}\x{e5}\x{212b}
  2672. /\x{01c4}+/i,utf
  2673. \x{01c4}\x{01c5}\x{01c6}
  2674. 0: \x{1c4}\x{1c5}\x{1c6}
  2675. /\x{01c5}+/i,utf
  2676. \x{01c4}\x{01c5}\x{01c6}
  2677. 0: \x{1c4}\x{1c5}\x{1c6}
  2678. /\x{01c6}+/i,utf
  2679. \x{01c4}\x{01c5}\x{01c6}
  2680. 0: \x{1c4}\x{1c5}\x{1c6}
  2681. /\x{01c7}+/i,utf
  2682. \x{01c7}\x{01c8}\x{01c9}
  2683. 0: \x{1c7}\x{1c8}\x{1c9}
  2684. /\x{01c8}+/i,utf
  2685. \x{01c7}\x{01c8}\x{01c9}
  2686. 0: \x{1c7}\x{1c8}\x{1c9}
  2687. /\x{01c9}+/i,utf
  2688. \x{01c7}\x{01c8}\x{01c9}
  2689. 0: \x{1c7}\x{1c8}\x{1c9}
  2690. /\x{01ca}+/i,utf
  2691. \x{01ca}\x{01cb}\x{01cc}
  2692. 0: \x{1ca}\x{1cb}\x{1cc}
  2693. /\x{01cb}+/i,utf
  2694. \x{01ca}\x{01cb}\x{01cc}
  2695. 0: \x{1ca}\x{1cb}\x{1cc}
  2696. /\x{01cc}+/i,utf
  2697. \x{01ca}\x{01cb}\x{01cc}
  2698. 0: \x{1ca}\x{1cb}\x{1cc}
  2699. /\x{01f1}+/i,utf
  2700. \x{01f1}\x{01f2}\x{01f3}
  2701. 0: \x{1f1}\x{1f2}\x{1f3}
  2702. /\x{01f2}+/i,utf
  2703. \x{01f1}\x{01f2}\x{01f3}
  2704. 0: \x{1f1}\x{1f2}\x{1f3}
  2705. /\x{01f3}+/i,utf
  2706. \x{01f1}\x{01f2}\x{01f3}
  2707. 0: \x{1f1}\x{1f2}\x{1f3}
  2708. /\x{0345}+/i,utf
  2709. \x{0345}\x{0399}\x{03b9}\x{1fbe}
  2710. 0: \x{345}\x{399}\x{3b9}\x{1fbe}
  2711. /\x{0399}+/i,utf
  2712. \x{0345}\x{0399}\x{03b9}\x{1fbe}
  2713. 0: \x{345}\x{399}\x{3b9}\x{1fbe}
  2714. /\x{03b9}+/i,utf
  2715. \x{0345}\x{0399}\x{03b9}\x{1fbe}
  2716. 0: \x{345}\x{399}\x{3b9}\x{1fbe}
  2717. /\x{1fbe}+/i,utf
  2718. \x{0345}\x{0399}\x{03b9}\x{1fbe}
  2719. 0: \x{345}\x{399}\x{3b9}\x{1fbe}
  2720. /\x{0392}+/i,utf
  2721. \x{0392}\x{03b2}\x{03d0}
  2722. 0: \x{392}\x{3b2}\x{3d0}
  2723. /\x{03b2}+/i,utf
  2724. \x{0392}\x{03b2}\x{03d0}
  2725. 0: \x{392}\x{3b2}\x{3d0}
  2726. /\x{03d0}+/i,utf
  2727. \x{0392}\x{03b2}\x{03d0}
  2728. 0: \x{392}\x{3b2}\x{3d0}
  2729. /\x{0395}+/i,utf
  2730. \x{0395}\x{03b5}\x{03f5}
  2731. 0: \x{395}\x{3b5}\x{3f5}
  2732. /\x{03b5}+/i,utf
  2733. \x{0395}\x{03b5}\x{03f5}
  2734. 0: \x{395}\x{3b5}\x{3f5}
  2735. /\x{03f5}+/i,utf
  2736. \x{0395}\x{03b5}\x{03f5}
  2737. 0: \x{395}\x{3b5}\x{3f5}
  2738. /\x{0398}+/i,utf
  2739. \x{0398}\x{03b8}\x{03d1}\x{03f4}
  2740. 0: \x{398}\x{3b8}\x{3d1}\x{3f4}
  2741. /\x{03b8}+/i,utf
  2742. \x{0398}\x{03b8}\x{03d1}\x{03f4}
  2743. 0: \x{398}\x{3b8}\x{3d1}\x{3f4}
  2744. /\x{03d1}+/i,utf
  2745. \x{0398}\x{03b8}\x{03d1}\x{03f4}
  2746. 0: \x{398}\x{3b8}\x{3d1}\x{3f4}
  2747. /\x{03f4}+/i,utf
  2748. \x{0398}\x{03b8}\x{03d1}\x{03f4}
  2749. 0: \x{398}\x{3b8}\x{3d1}\x{3f4}
  2750. /\x{039a}+/i,utf
  2751. \x{039a}\x{03ba}\x{03f0}
  2752. 0: \x{39a}\x{3ba}\x{3f0}
  2753. /\x{03ba}+/i,utf
  2754. \x{039a}\x{03ba}\x{03f0}
  2755. 0: \x{39a}\x{3ba}\x{3f0}
  2756. /\x{03f0}+/i,utf
  2757. \x{039a}\x{03ba}\x{03f0}
  2758. 0: \x{39a}\x{3ba}\x{3f0}
  2759. /\x{03a0}+/i,utf
  2760. \x{03a0}\x{03c0}\x{03d6}
  2761. 0: \x{3a0}\x{3c0}\x{3d6}
  2762. /\x{03c0}+/i,utf
  2763. \x{03a0}\x{03c0}\x{03d6}
  2764. 0: \x{3a0}\x{3c0}\x{3d6}
  2765. /\x{03d6}+/i,utf
  2766. \x{03a0}\x{03c0}\x{03d6}
  2767. 0: \x{3a0}\x{3c0}\x{3d6}
  2768. /\x{03a1}+/i,utf
  2769. \x{03a1}\x{03c1}\x{03f1}
  2770. 0: \x{3a1}\x{3c1}\x{3f1}
  2771. /\x{03c1}+/i,utf
  2772. \x{03a1}\x{03c1}\x{03f1}
  2773. 0: \x{3a1}\x{3c1}\x{3f1}
  2774. /\x{03f1}+/i,utf
  2775. \x{03a1}\x{03c1}\x{03f1}
  2776. 0: \x{3a1}\x{3c1}\x{3f1}
  2777. /\x{03a3}+/i,utf
  2778. \x{03A3}\x{03C2}\x{03C3}
  2779. 0: \x{3a3}\x{3c2}\x{3c3}
  2780. /\x{03c2}+/i,utf
  2781. \x{03A3}\x{03C2}\x{03C3}
  2782. 0: \x{3a3}\x{3c2}\x{3c3}
  2783. /\x{03c3}+/i,utf
  2784. \x{03A3}\x{03C2}\x{03C3}
  2785. 0: \x{3a3}\x{3c2}\x{3c3}
  2786. /\x{03a6}+/i,utf
  2787. \x{03a6}\x{03c6}\x{03d5}
  2788. 0: \x{3a6}\x{3c6}\x{3d5}
  2789. /\x{03c6}+/i,utf
  2790. \x{03a6}\x{03c6}\x{03d5}
  2791. 0: \x{3a6}\x{3c6}\x{3d5}
  2792. /\x{03d5}+/i,utf
  2793. \x{03a6}\x{03c6}\x{03d5}
  2794. 0: \x{3a6}\x{3c6}\x{3d5}
  2795. /\x{03c9}+/i,utf
  2796. \x{03c9}\x{03a9}\x{2126}
  2797. 0: \x{3c9}\x{3a9}\x{2126}
  2798. /\x{03a9}+/i,utf
  2799. \x{03c9}\x{03a9}\x{2126}
  2800. 0: \x{3c9}\x{3a9}\x{2126}
  2801. /\x{2126}+/i,utf
  2802. \x{03c9}\x{03a9}\x{2126}
  2803. 0: \x{3c9}\x{3a9}\x{2126}
  2804. /\x{1e60}+/i,utf
  2805. \x{1e60}\x{1e61}\x{1e9b}
  2806. 0: \x{1e60}\x{1e61}\x{1e9b}
  2807. /\x{1e61}+/i,utf
  2808. \x{1e60}\x{1e61}\x{1e9b}
  2809. 0: \x{1e60}\x{1e61}\x{1e9b}
  2810. /\x{1e9b}+/i,utf
  2811. \x{1e60}\x{1e61}\x{1e9b}
  2812. 0: \x{1e60}\x{1e61}\x{1e9b}
  2813. /\x{1e9e}+/i,utf
  2814. \x{1e9e}\x{00df}
  2815. 0: \x{1e9e}\x{df}
  2816. /\x{00df}+/i,utf
  2817. \x{1e9e}\x{00df}
  2818. 0: \x{1e9e}\x{df}
  2819. /\x{1f88}+/i,utf
  2820. \x{1f88}\x{1f80}
  2821. 0: \x{1f88}\x{1f80}
  2822. /\x{1f80}+/i,utf
  2823. \x{1f88}\x{1f80}
  2824. 0: \x{1f88}\x{1f80}
  2825. # Perl 5.12.4 gets these wrong, but 5.15.3 is OK
  2826. /\x{004b}+/i,utf
  2827. \x{004b}\x{006b}\x{212a}
  2828. 0: Kk\x{212a}
  2829. /\x{006b}+/i,utf
  2830. \x{004b}\x{006b}\x{212a}
  2831. 0: Kk\x{212a}
  2832. /\x{212a}+/i,utf
  2833. \x{004b}\x{006b}\x{212a}
  2834. 0: Kk\x{212a}
  2835. /\x{0053}+/i,utf
  2836. \x{0053}\x{0073}\x{017f}
  2837. 0: Ss\x{17f}
  2838. /\x{0073}+/i,utf
  2839. \x{0053}\x{0073}\x{017f}
  2840. 0: Ss\x{17f}
  2841. /\x{017f}+/i,utf
  2842. \x{0053}\x{0073}\x{017f}
  2843. 0: Ss\x{17f}
  2844. /^\p{Any}*\d{4}/utf
  2845. 1234
  2846. 0: 1234
  2847. \= Expect no match
  2848. 123
  2849. No match
  2850. /^\X*\w{4}/utf
  2851. 1234
  2852. 0: 1234
  2853. \= Expect no match
  2854. 123
  2855. No match
  2856. /^A\s+Z/utf,ucp
  2857. A\x{2005}Z
  2858. 0: A\x{2005}Z
  2859. A\x{85}\x{2005}Z
  2860. 0: A\x{85}\x{2005}Z
  2861. /^A[\s]+Z/utf,ucp
  2862. A\x{2005}Z
  2863. 0: A\x{2005}Z
  2864. A\x{85}\x{2005}Z
  2865. 0: A\x{85}\x{2005}Z
  2866. /^[[:graph:]]+$/utf,ucp
  2867. Letter:ABC
  2868. 0: Letter:ABC
  2869. Mark:\x{300}\x{1d172}\x{1d17b}
  2870. 0: Mark:\x{300}\x{1d172}\x{1d17b}
  2871. Number:9\x{660}
  2872. 0: Number:9\x{660}
  2873. Punctuation:\x{66a},;
  2874. 0: Punctuation:\x{66a},;
  2875. Symbol:\x{6de}<>\x{fffc}
  2876. 0: Symbol:\x{6de}<>\x{fffc}
  2877. Cf-property:\x{ad}\x{600}\x{601}\x{602}\x{603}\x{604}\x{6dd}\x{70f}
  2878. 0: Cf-property:\x{ad}\x{600}\x{601}\x{602}\x{603}\x{604}\x{6dd}\x{70f}
  2879. \x{200b}\x{200c}\x{200d}\x{200e}\x{200f}
  2880. 0: \x{200b}\x{200c}\x{200d}\x{200e}\x{200f}
  2881. \x{202a}\x{202b}\x{202c}\x{202d}\x{202e}
  2882. 0: \x{202a}\x{202b}\x{202c}\x{202d}\x{202e}
  2883. \x{2060}\x{2061}\x{2062}\x{2063}\x{2064}
  2884. 0: \x{2060}\x{2061}\x{2062}\x{2063}\x{2064}
  2885. \x{206a}\x{206b}\x{206c}\x{206d}\x{206e}\x{206f}
  2886. 0: \x{206a}\x{206b}\x{206c}\x{206d}\x{206e}\x{206f}
  2887. \x{feff}
  2888. 0: \x{feff}
  2889. \x{fff9}\x{fffa}\x{fffb}
  2890. 0: \x{fff9}\x{fffa}\x{fffb}
  2891. \x{110bd}
  2892. 0: \x{110bd}
  2893. \x{1d173}\x{1d174}\x{1d175}\x{1d176}\x{1d177}\x{1d178}\x{1d179}\x{1d17a}
  2894. 0: \x{1d173}\x{1d174}\x{1d175}\x{1d176}\x{1d177}\x{1d178}\x{1d179}\x{1d17a}
  2895. \x{e0001}
  2896. 0: \x{e0001}
  2897. \x{e0020}\x{e0030}\x{e0040}\x{e0050}\x{e0060}\x{e0070}\x{e007f}
  2898. 0: \x{e0020}\x{e0030}\x{e0040}\x{e0050}\x{e0060}\x{e0070}\x{e007f}
  2899. \= Expect no match
  2900. \x{09}
  2901. No match
  2902. \x{0a}
  2903. No match
  2904. \x{1D}
  2905. No match
  2906. \x{20}
  2907. No match
  2908. \x{85}
  2909. No match
  2910. \x{a0}
  2911. No match
  2912. \x{1680}
  2913. No match
  2914. \x{2028}
  2915. No match
  2916. \x{2029}
  2917. No match
  2918. \x{202f}
  2919. No match
  2920. \x{2065}
  2921. No match
  2922. \x{3000}
  2923. No match
  2924. \x{e0002}
  2925. No match
  2926. \x{e001f}
  2927. No match
  2928. \x{e0080}
  2929. No match
  2930. /^[[:print:]]+$/utf,ucp
  2931. Space: \x{a0}
  2932. 0: Space: \x{a0}
  2933. \x{1680}\x{2000}\x{2001}\x{2002}\x{2003}\x{2004}\x{2005}
  2934. 0: \x{1680}\x{2000}\x{2001}\x{2002}\x{2003}\x{2004}\x{2005}
  2935. \x{2006}\x{2007}\x{2008}\x{2009}\x{200a}
  2936. 0: \x{2006}\x{2007}\x{2008}\x{2009}\x{200a}
  2937. \x{202f}\x{205f}
  2938. 0: \x{202f}\x{205f}
  2939. \x{3000}
  2940. 0: \x{3000}
  2941. Letter:ABC
  2942. 0: Letter:ABC
  2943. Mark:\x{300}\x{1d172}\x{1d17b}
  2944. 0: Mark:\x{300}\x{1d172}\x{1d17b}
  2945. Number:9\x{660}
  2946. 0: Number:9\x{660}
  2947. Punctuation:\x{66a},;
  2948. 0: Punctuation:\x{66a},;
  2949. Symbol:\x{6de}<>\x{fffc}
  2950. 0: Symbol:\x{6de}<>\x{fffc}
  2951. Cf-property:\x{ad}\x{600}\x{601}\x{602}\x{603}\x{604}\x{6dd}\x{70f}
  2952. 0: Cf-property:\x{ad}\x{600}\x{601}\x{602}\x{603}\x{604}\x{6dd}\x{70f}
  2953. \x{200b}\x{200c}\x{200d}\x{200e}\x{200f}
  2954. 0: \x{200b}\x{200c}\x{200d}\x{200e}\x{200f}
  2955. \x{202a}\x{202b}\x{202c}\x{202d}\x{202e}
  2956. 0: \x{202a}\x{202b}\x{202c}\x{202d}\x{202e}
  2957. \x{202f}
  2958. 0: \x{202f}
  2959. \x{2060}\x{2061}\x{2062}\x{2063}\x{2064}
  2960. 0: \x{2060}\x{2061}\x{2062}\x{2063}\x{2064}
  2961. \x{206a}\x{206b}\x{206c}\x{206d}\x{206e}\x{206f}
  2962. 0: \x{206a}\x{206b}\x{206c}\x{206d}\x{206e}\x{206f}
  2963. \x{feff}
  2964. 0: \x{feff}
  2965. \x{fff9}\x{fffa}\x{fffb}
  2966. 0: \x{fff9}\x{fffa}\x{fffb}
  2967. \x{110bd}
  2968. 0: \x{110bd}
  2969. \x{1d173}\x{1d174}\x{1d175}\x{1d176}\x{1d177}\x{1d178}\x{1d179}\x{1d17a}
  2970. 0: \x{1d173}\x{1d174}\x{1d175}\x{1d176}\x{1d177}\x{1d178}\x{1d179}\x{1d17a}
  2971. \x{e0001}
  2972. 0: \x{e0001}
  2973. \x{e0020}\x{e0030}\x{e0040}\x{e0050}\x{e0060}\x{e0070}\x{e007f}
  2974. 0: \x{e0020}\x{e0030}\x{e0040}\x{e0050}\x{e0060}\x{e0070}\x{e007f}
  2975. \= Expect no match
  2976. \x{09}
  2977. No match
  2978. \x{1D}
  2979. No match
  2980. \x{85}
  2981. No match
  2982. \x{2028}
  2983. No match
  2984. \x{2029}
  2985. No match
  2986. \x{2065}
  2987. No match
  2988. \x{e0002}
  2989. No match
  2990. \x{e001f}
  2991. No match
  2992. \x{e0080}
  2993. No match
  2994. /^[[:punct:]]+$/utf,ucp
  2995. \$+<=>^`|~
  2996. 0: $+<=>^`|~
  2997. !\"#%&'()*,-./:;?@[\\]_{}
  2998. 0: !"#%&'()*,-./:;?@[\]_{}
  2999. \x{a1}\x{a7}
  3000. 0: \x{a1}\x{a7}
  3001. \x{37e}
  3002. 0: \x{37e}
  3003. \= Expect no match
  3004. abcde
  3005. No match
  3006. /^[[:^graph:]]+$/utf,ucp
  3007. \x{09}\x{0a}\x{1D}\x{20}\x{85}\x{a0}\x{1680}
  3008. 0: \x{09}\x{0a}\x{1d} \x{85}\x{a0}\x{1680}
  3009. \x{2028}\x{2029}\x{202f}\x{2065}
  3010. 0: \x{2028}\x{2029}\x{202f}\x{2065}
  3011. \x{3000}\x{e0002}\x{e001f}\x{e0080}
  3012. 0: \x{3000}\x{e0002}\x{e001f}\x{e0080}
  3013. \= Expect no match
  3014. Letter:ABC
  3015. No match
  3016. Mark:\x{300}\x{1d172}\x{1d17b}
  3017. No match
  3018. Number:9\x{660}
  3019. No match
  3020. Punctuation:\x{66a},;
  3021. No match
  3022. Symbol:\x{6de}<>\x{fffc}
  3023. No match
  3024. Cf-property:\x{ad}\x{600}\x{601}\x{602}\x{603}\x{604}\x{6dd}\x{70f}
  3025. No match
  3026. \x{200b}\x{200c}\x{200d}\x{200e}\x{200f}
  3027. No match
  3028. \x{202a}\x{202b}\x{202c}\x{202d}\x{202e}
  3029. No match
  3030. \x{2060}\x{2061}\x{2062}\x{2063}\x{2064}
  3031. No match
  3032. \x{206a}\x{206b}\x{206c}\x{206d}\x{206e}\x{206f}
  3033. No match
  3034. \x{feff}
  3035. No match
  3036. \x{fff9}\x{fffa}\x{fffb}
  3037. No match
  3038. \x{110bd}
  3039. No match
  3040. \x{1d173}\x{1d174}\x{1d175}\x{1d176}\x{1d177}\x{1d178}\x{1d179}\x{1d17a}
  3041. No match
  3042. \x{e0001}
  3043. No match
  3044. \x{e0020}\x{e0030}\x{e0040}\x{e0050}\x{e0060}\x{e0070}\x{e007f}
  3045. No match
  3046. /^[[:^print:]]+$/utf,ucp
  3047. \x{09}\x{1D}\x{85}\x{2028}\x{2029}\x{2065}
  3048. 0: \x{09}\x{1d}\x{85}\x{2028}\x{2029}\x{2065}
  3049. \x{e0002}\x{e001f}\x{e0080}
  3050. 0: \x{e0002}\x{e001f}\x{e0080}
  3051. \= Expect no match
  3052. Space: \x{a0}
  3053. No match
  3054. \x{1680}\x{2000}\x{2001}\x{2002}\x{2003}\x{2004}\x{2005}
  3055. No match
  3056. \x{2006}\x{2007}\x{2008}\x{2009}\x{200a}
  3057. No match
  3058. \x{202f}\x{205f}
  3059. No match
  3060. \x{3000}
  3061. No match
  3062. Letter:ABC
  3063. No match
  3064. Mark:\x{300}\x{1d172}\x{1d17b}
  3065. No match
  3066. Number:9\x{660}
  3067. No match
  3068. Punctuation:\x{66a},;
  3069. No match
  3070. Symbol:\x{6de}<>\x{fffc}
  3071. No match
  3072. Cf-property:\x{ad}\x{600}\x{601}\x{602}\x{603}\x{604}\x{6dd}\x{70f}
  3073. No match
  3074. \x{200b}\x{200c}\x{200d}\x{200e}\x{200f}
  3075. No match
  3076. \x{202a}\x{202b}\x{202c}\x{202d}\x{202e}
  3077. No match
  3078. \x{202f}
  3079. No match
  3080. \x{2060}\x{2061}\x{2062}\x{2063}\x{2064}
  3081. No match
  3082. \x{206a}\x{206b}\x{206c}\x{206d}\x{206e}\x{206f}
  3083. No match
  3084. \x{feff}
  3085. No match
  3086. \x{fff9}\x{fffa}\x{fffb}
  3087. No match
  3088. \x{110bd}
  3089. No match
  3090. \x{1d173}\x{1d174}\x{1d175}\x{1d176}\x{1d177}\x{1d178}\x{1d179}\x{1d17a}
  3091. No match
  3092. \x{e0001}
  3093. No match
  3094. \x{e0020}\x{e0030}\x{e0040}\x{e0050}\x{e0060}\x{e0070}\x{e007f}
  3095. No match
  3096. /^[[:^punct:]]+$/utf,ucp
  3097. abcde
  3098. 0: abcde
  3099. \= Expect no match
  3100. \$+<=>^`|~
  3101. No match
  3102. !\"#%&'()*,-./:;?@[\\]_{}
  3103. No match
  3104. \x{a1}\x{a7}
  3105. No match
  3106. \x{37e}
  3107. No match
  3108. /[RST]+/i,utf,ucp
  3109. Ss\x{17f}
  3110. 0: Ss\x{17f}
  3111. /[R-T]+/i,utf,ucp
  3112. Ss\x{17f}
  3113. 0: Ss\x{17f}
  3114. /[q-u]+/i,utf,ucp
  3115. Ss\x{17f}
  3116. 0: Ss\x{17f}
  3117. /^s?c/im,utf
  3118. scat
  3119. 0: sc
  3120. # The next four tests are for repeated caseless back references when the
  3121. # code unit length of the matched text is different to that of the original
  3122. # group in the UTF-8 case.
  3123. /^(\x{23a})\1*(.)/i,utf
  3124. \x{23a}\x{23a}\x{23a}\x{23a}
  3125. 0: \x{23a}\x{23a}\x{23a}\x{23a}
  3126. 1: \x{23a}
  3127. 2: \x{23a}
  3128. \x{23a}\x{2c65}\x{2c65}\x{2c65}
  3129. 0: \x{23a}\x{2c65}\x{2c65}\x{2c65}
  3130. 1: \x{23a}
  3131. 2: \x{2c65}
  3132. \x{23a}\x{23a}\x{2c65}\x{23a}
  3133. 0: \x{23a}\x{23a}\x{2c65}\x{23a}
  3134. 1: \x{23a}
  3135. 2: \x{23a}
  3136. /^(\x{23a})\1*(..)/i,utf
  3137. \x{23a}\x{2c65}\x{2c65}\x{2c65}
  3138. 0: \x{23a}\x{2c65}\x{2c65}\x{2c65}
  3139. 1: \x{23a}
  3140. 2: \x{2c65}\x{2c65}
  3141. \x{23a}\x{23a}\x{2c65}\x{23a}
  3142. 0: \x{23a}\x{23a}\x{2c65}\x{23a}
  3143. 1: \x{23a}
  3144. 2: \x{2c65}\x{23a}
  3145. /^(\x{23a})\1*(...)/i,utf
  3146. \x{23a}\x{2c65}\x{2c65}\x{2c65}
  3147. 0: \x{23a}\x{2c65}\x{2c65}\x{2c65}
  3148. 1: \x{23a}
  3149. 2: \x{2c65}\x{2c65}\x{2c65}
  3150. \x{23a}\x{23a}\x{2c65}\x{23a}
  3151. 0: \x{23a}\x{23a}\x{2c65}\x{23a}
  3152. 1: \x{23a}
  3153. 2: \x{23a}\x{2c65}\x{23a}
  3154. /^(\x{23a})\1*(....)/i,utf
  3155. \= Expect no match
  3156. \x{23a}\x{2c65}\x{2c65}\x{2c65}
  3157. No match
  3158. \x{23a}\x{23a}\x{2c65}\x{23a}
  3159. No match
  3160. /[A-`]/i,utf
  3161. abcdefghijklmno
  3162. 0: a
  3163. /[\S\V\H]/utf
  3164. /[^\p{Any}]*+x/utf
  3165. x
  3166. 0: x
  3167. /[[:punct:]]/utf,ucp
  3168. \x{b4}
  3169. No match
  3170. /[[:^ascii:]]/utf,ucp
  3171. \x{100}
  3172. 0: \x{100}
  3173. \x{200}
  3174. 0: \x{200}
  3175. \x{300}
  3176. 0: \x{300}
  3177. \x{37e}
  3178. 0: \x{37e}
  3179. \= Expect no match
  3180. aa
  3181. No match
  3182. 99
  3183. No match
  3184. /[[:^ascii:]\w]/utf,ucp
  3185. aa
  3186. 0: a
  3187. 99
  3188. 0: 9
  3189. gg
  3190. 0: g
  3191. \x{100}
  3192. 0: \x{100}
  3193. \x{200}
  3194. 0: \x{200}
  3195. \x{300}
  3196. 0: \x{300}
  3197. \x{37e}
  3198. 0: \x{37e}
  3199. /[\w[:^ascii:]]/utf,ucp
  3200. aa
  3201. 0: a
  3202. 99
  3203. 0: 9
  3204. gg
  3205. 0: g
  3206. \x{100}
  3207. 0: \x{100}
  3208. \x{200}
  3209. 0: \x{200}
  3210. \x{300}
  3211. 0: \x{300}
  3212. \x{37e}
  3213. 0: \x{37e}
  3214. /[^[:ascii:]\W]/utf,ucp
  3215. \x{100}
  3216. 0: \x{100}
  3217. \x{200}
  3218. 0: \x{200}
  3219. \= Expect no match
  3220. aa
  3221. No match
  3222. 99
  3223. No match
  3224. gg
  3225. No match
  3226. \x{37e}
  3227. No match
  3228. /[^[:^ascii:]\d]/utf,ucp
  3229. a
  3230. 0: a
  3231. ~
  3232. 0: ~
  3233. \a
  3234. 0: \x{07}
  3235. \x{7f}
  3236. 0: \x{7f}
  3237. \= Expect no match
  3238. 0
  3239. No match
  3240. \x{389}
  3241. No match
  3242. \x{20ac}
  3243. No match
  3244. /(?=.*b)\pL/
  3245. 11bb
  3246. 0: b
  3247. /(?(?=.*b)(?=.*b)\pL|.*c)/
  3248. 11bb
  3249. 0: b
  3250. /^\x{123}+?$/utf,no_auto_possess
  3251. \x{123}\x{123}\x{123}
  3252. 0: \x{123}\x{123}\x{123}
  3253. /^\x{123}+?$/i,utf,no_auto_possess
  3254. \x{123}\x{122}\x{123}
  3255. 0: \x{123}\x{122}\x{123}
  3256. \= Expect no match
  3257. \x{123}\x{124}\x{123}
  3258. No match
  3259. /\N{U+1234}/utf
  3260. \x{1234}
  3261. 0: \x{1234}
  3262. /[\N{U+1234}]/utf
  3263. \x{1234}
  3264. 0: \x{1234}
  3265. # Test the full list of Unicode "Pattern White Space" characters that are to
  3266. # be ignored by /x. The pattern lines below may show up oddly in text editors
  3267. # or when listed to the screen. Note that characters such as U+2002, which are
  3268. # matched as space by \h and \v are *not* "Pattern White Space".
  3269. /A…‎‏

B/x,utf
  3270. AB
  3271. 0: AB
  3272. /A B/x,utf
  3273. A\x{2002}B
  3274. 0: A\x{2002}B
  3275. \= Expect no match
  3276. AB
  3277. No match
  3278. # -------
  3279. /[^\x{100}-\x{ffff}]*[\x80-\xff]/utf
  3280. \x{99}\x{99}\x{99}
  3281. 0: \x{99}\x{99}\x{99}
  3282. /[^\x{100}-\x{ffff}ABC]*[\x80-\xff]/utf
  3283. \x{99}\x{99}\x{99}
  3284. 0: \x{99}\x{99}\x{99}
  3285. /[^\x{100}-\x{ffff}]*[\x80-\xff]/i,utf
  3286. \x{99}\x{99}\x{99}
  3287. 0: \x{99}\x{99}\x{99}
  3288. # Script run tests
  3289. /^(*script_run:.{4})/utf
  3290. abcd Latin x4
  3291. 0: abcd
  3292. \x{2e80}\x{2fa1d}\x{3041}\x{30a1} Han Han Hiragana Katakana
  3293. 0: \x{2e80}\x{2fa1d}\x{3041}\x{30a1}
  3294. \x{3041}\x{30a1}\x{3007}\x{3007} Hiragana Katakana Han Han
  3295. 0: \x{3041}\x{30a1}\x{3007}\x{3007}
  3296. \x{30a1}\x{3041}\x{3007}\x{3007} Katakana Hiragana Han Han
  3297. 0: \x{30a1}\x{3041}\x{3007}\x{3007}
  3298. \x{1100}\x{2e80}\x{2e80}\x{1101} Hangul Han Han Hangul
  3299. 0: \x{1100}\x{2e80}\x{2e80}\x{1101}
  3300. \x{2e80}\x{3105}\x{2e80}\x{3105} Han Bopomofo Han Bopomofo
  3301. 0: \x{2e80}\x{3105}\x{2e80}\x{3105}
  3302. \x{02ea}\x{2e80}\x{2e80}\x{3105} Bopomofo-Sk Han Han Bopomofo
  3303. 0: \x{2ea}\x{2e80}\x{2e80}\x{3105}
  3304. \x{3105}\x{2e80}\x{2e80}\x{3105} Bopomofo Han Han Bopomofo
  3305. 0: \x{3105}\x{2e80}\x{2e80}\x{3105}
  3306. \x{0300}cd! Inherited Latin Latin Common
  3307. 0: \x{300}cd!
  3308. \x{0391}12\x{03a9} Greek Common-digits Greek
  3309. 0: \x{391}12\x{3a9}
  3310. \x{0400}12\x{fe2f} Cyrillic Common-digits Cyrillic
  3311. 0: \x{400}12\x{fe2f}
  3312. \x{0531}12\x{fb17} Armenian Common-digits Armenian
  3313. 0: \x{531}12\x{fb17}
  3314. \x{0591}12\x{fb4f} Hebrew Common-digits Hebrew
  3315. 0: \x{591}12\x{fb4f}
  3316. \x{0600}12\x{1eef1} Arabic Common-digits Arabic
  3317. 0: \x{600}12\x{1eef1}
  3318. \x{0600}\x{0660}\x{0669}\x{1eef1} Arabic Arabic-digits Arabic
  3319. 0: \x{600}\x{660}\x{669}\x{1eef1}
  3320. \x{0700}12\x{086a} Syriac Common-digits Syriac
  3321. 0: \x{700}12\x{86a}
  3322. \x{1200}12\x{ab2e} Ethiopic Common-digits Ethiopic
  3323. 0: \x{1200}12\x{ab2e}
  3324. \x{1680}12\x{169c} Ogham Common-digits Ogham
  3325. 0: \x{1680}12\x{169c}
  3326. \x{3041}12\x{3041} Hiragana Common-digits Hiragana
  3327. 0: \x{3041}12\x{3041}
  3328. \x{0980}\x{09e6}\x{09e7}\x{0993} Bengali Bengali-digits Bengali
  3329. 0: \x{980}\x{9e6}\x{9e7}\x{993}
  3330. !cde Common Latin Latin Latin
  3331. 0: !cde
  3332. A..B Latin Common Common Latin
  3333. 0: A..B
  3334. 0abc Ascii-digit Latin Latin Latin
  3335. 0: 0abc
  3336. 1\x{0700}\x{0700}\x{0700} Ascii-digit Syriac x 3
  3337. 0: 1\x{700}\x{700}\x{700}
  3338. \x{1A80}\x{1A80}\x{1a40}\x{1a41} Tai Tham Hora digits, letters
  3339. 0: \x{1a80}\x{1a80}\x{1a40}\x{1a41}
  3340. \= Expect no match
  3341. a\x{370}bcd Latin Greek Latin Latin
  3342. No match
  3343. \x{1100}\x{02ea}\x{02ea}\x{02ea} Hangul Bopomofo x3
  3344. No match
  3345. \x{02ea}\x{02ea}\x{02ea}\x{1100} Bopomofo x3 Hangul
  3346. No match
  3347. \x{1100}\x{2e80}\x{3041}\x{1101} Hangul Han Hiragana Hangul
  3348. No match
  3349. \x{0391}\x{09e6}\x{09e7}\x{03a9} Greek Bengali digits Greek
  3350. No match
  3351. \x{0600}7\x{0669}\x{1eef1} Arabic ascii-digit Arabic-digit Arabic
  3352. No match
  3353. \x{0600}\x{0669}7\x{1eef1} Arabic Arabic-digit ascii-digit Arabic
  3354. No match
  3355. A5\x{ff19}B Latin Common-ascii/notascii-digits Latin
  3356. No match
  3357. \x{0300}cd\x{0391} Inherited Latin Latin Greek
  3358. No match
  3359. !cd\x{0391} Common Latin Latin Greek
  3360. No match
  3361. \x{1A80}\x{1A90}\x{1a40}\x{1a41} Tai Tham Hora digit, Tham digit, letters
  3362. No match
  3363. A\x{1d7ce}\x{1d7ff}B Common fancy-common-2-sets-digits Common
  3364. No match
  3365. \x{2e80}\x{3105}\x{2e80}\x{30a1} Han Bopomofo Han Katakana
  3366. No match
  3367. /^(*sr:.{4}|..)/utf
  3368. \x{2e80}\x{3105}\x{2e80}\x{30a1} Han Bopomofo Han Katakana
  3369. 0: \x{2e80}\x{3105}
  3370. /^(*atomic_script_run:.{4}|..)/utf
  3371. \= Expect no match
  3372. \x{2e80}\x{3105}\x{2e80}\x{30a1} Han Bopomofo Han Katakana
  3373. No match
  3374. /^(*asr:.*)/utf
  3375. \= Expect no match
  3376. \x{2e80}\x{3105}\x{2e80}\x{30a1} Han Bopomofo Han Katakana
  3377. No match
  3378. /^(?>(*sr:.*))/utf
  3379. \x{2e80}\x{3105}\x{2e80}\x{30a1} Han Bopomofo Han Katakana
  3380. 0: \x{2e80}\x{3105}\x{2e80}
  3381. /^(*sr:.*)/utf
  3382. \x{2e80}\x{3105}\x{2e80}\x{30a1} Han Bopomofo Han Katakana
  3383. 0: \x{2e80}\x{3105}\x{2e80}
  3384. \x{10fffd}\x{10fffd}\x{10fffd} Private use (Unknown)
  3385. 0: \x{10fffd}
  3386. /^(*sr:\x{2e80}*)/utf
  3387. \x{2e80}\x{2e80}\x{3105} Han Han Bopomofo
  3388. 0: \x{2e80}\x{2e80}
  3389. /^(*sr:\x{2e80}*)\x{2e80}/utf
  3390. \x{2e80}\x{2e80}\x{3105} Han Han Bopomofo
  3391. 0: \x{2e80}\x{2e80}
  3392. /^(*sr:.*)Test/utf
  3393. Test script run on an empty string
  3394. 0: Test
  3395. /^(*sr:(.{2})){2}/utf
  3396. \x{0600}7\x{0669}\x{1eef1} Arabic ascii-digit Arabic-digit Arabic
  3397. 0: \x{600}7\x{669}\x{1eef1}
  3398. 1: \x{669}\x{1eef1}
  3399. \x{1A80}\x{1A80}\x{1a40}\x{1a41} Tai Tham Hora digits, letters
  3400. 0: \x{1a80}\x{1a80}\x{1a40}\x{1a41}
  3401. 1: \x{1a40}\x{1a41}
  3402. \x{1A80}\x{1a40}\x{1A90}\x{1a41} Tai Tham Hora digit, letter, Tham digit, letter
  3403. 0: \x{1a80}\x{1a40}\x{1a90}\x{1a41}
  3404. 1: \x{1a90}\x{1a41}
  3405. \= Expect no match
  3406. \x{1100}\x{2e80}\x{3041}\x{1101} Hangul Han Hiragana Hangul
  3407. No match
  3408. /^(*sr:\S*)/utf
  3409. \x{1cf4}\x{20f0}\x{900}\x{11305} [Dev,Gran,Kan] [Dev,Gran,Lat] Dev Gran
  3410. 0: \x{1cf4}\x{20f0}\x{900}
  3411. \x{1cf4}\x{20f0}\x{11305}\x{900} [Dev,Gran,Kan] [Dev,Gran,Lat] Gran Dev
  3412. 0: \x{1cf4}\x{20f0}\x{11305}
  3413. \x{1cf4}\x{20f0}\x{900}ABC [Dev,Gran,Kan] [Dev,Gran,Lat] Dev Lat
  3414. 0: \x{1cf4}\x{20f0}\x{900}
  3415. \x{1cf4}\x{20f0}ABC [Dev,Gran,Kan] [Dev,Gran,Lat] Lat
  3416. 0: \x{1cf4}\x{20f0}
  3417. \x{20f0}ABC [Dev,Gran,Lat] Lat
  3418. 0: \x{20f0}ABC
  3419. XYZ\x{20f0}ABC Lat [Dev,Gran,Lat] Lat
  3420. 0: XYZ\x{20f0}ABC
  3421. \x{a36}\x{a33}\x{900} [Dev,...] [Dev,...] Dev
  3422. 0: \x{a36}\x{a33}
  3423. \x{3001}\x{2e80}\x{3041}\x{30a1} [Bopo, Han, etc] Han Hira Kata
  3424. 0: \x{3001}\x{2e80}\x{3041}\x{30a1}
  3425. \x{3001}\x{30a1}\x{2e80}\x{3041} [Bopo, Han, etc] Kata Han Hira
  3426. 0: \x{3001}\x{30a1}\x{2e80}\x{3041}
  3427. \x{3001}\x{3105}\x{2e80}\x{1101} [Bopo, Han, etc] Bopomofo Han Hangul
  3428. 0: \x{3001}\x{3105}\x{2e80}
  3429. \x{3105}\x{3001}\x{2e80}\x{1101} Bopomofo [Bopo, Han, etc] Han Hangul
  3430. 0: \x{3105}\x{3001}\x{2e80}
  3431. \x{3031}\x{3041}\x{30a1}\x{2e80} [Hira Kata] Hira Kata Han
  3432. 0: \x{3031}\x{3041}\x{30a1}\x{2e80}
  3433. \x{060c}\x{06d4}\x{0600}\x{10d00}\x{0700} [Arab Rohg Syrc Thaa] [Arab Rohg] Arab Rohg Syrc
  3434. 0: \x{60c}\x{6d4}\x{600}
  3435. \x{060c}\x{06d4}\x{0700}\x{0600}\x{10d00} [Arab Rohg Syrc Thaa] [Arab Rohg] Syrc Arab Rohg
  3436. 0: \x{60c}\x{6d4}
  3437. \x{2e80}\x{3041}\x{3001}\x{3031}\x{2e80} Han Hira [Bopo, Han, etc] [Hira Kata] Han
  3438. 0: \x{2e80}\x{3041}\x{3001}\x{3031}\x{2e80}
  3439. /(?<!)(*sr:)/
  3440. /(?<!X(*sr:B)C)/
  3441. /(?<=abc(?=X(*sr:BCY)Z)XBCYZ)./
  3442. abcXBCYZ!
  3443. 0: !
  3444. /(?<=abc(?=X(*sr:BXY)CCC)XBXYCCC)./
  3445. abcXBXYCCC!
  3446. 0: !
  3447. /^(*sr:\S*)/utf
  3448. \x{10d00}\x{10d00}\x{06d4} Rohingya Rohingya Arabic-full-stop
  3449. 0: \x{10d00}\x{10d00}\x{6d4}
  3450. \x{06d4}\x{10d00}\x{10d00} Arabic-full-stop Rohingya Rohingya
  3451. 0: \x{6d4}\x{10d00}\x{10d00}
  3452. \x{10d00}\x{10d00}\x{0363} Rohingya Rohingya Inherited-extend-Latin
  3453. 0: \x{10d00}\x{10d00}
  3454. \x{0363}\x{10d00}\x{10d00} Inherited-extend-Latin Rohingya Rohingya
  3455. 0: \x{363}
  3456. AB\x{0363} Latin Latin Inherited-extend-Latin
  3457. 0: AB\x{363}
  3458. \x{0363}AB Inherited-extend-Latin Latin Latin
  3459. 0: \x{363}AB
  3460. AB\x{1cf7} Latin Latin Common-extended-Beng
  3461. 0: AB
  3462. \x{1cf7}AB Common-extend-Beng Latin Latin
  3463. 0: \x{1cf7}
  3464. \x{1cf7}\x{0993} Common-extend-Beng Bengali
  3465. 0: \x{1cf7}\x{993}
  3466. A\x{1abe}BC Test enclosing mark
  3467. 0: A\x{1abe}BC
  3468. \x{0370}\x{1abe}\x{0371} Which can occur with any script (Greek here)
  3469. 0: \x{370}\x{1abe}\x{371}
  3470. \x{3001}\x{adf9}\x{3001} [.. Hangul ..] Hangul [.. Hangul ..]
  3471. 0: \x{3001}\x{adf9}\x{3001}
  3472. \x{3400}\x{3001}XXX Han [Han etc.]
  3473. 0: \x{3400}\x{3001}
  3474. \x{3400}\x{1cd5} Han [Bengali Devanagari]
  3475. 0: \x{3400}
  3476. \x{ac01}\x{3400} Hangul [.. Hangul ..]
  3477. 0: \x{ac01}\x{3400}
  3478. \x{ac01}\x{1cd5} Hangul [Bengali Devanagari]
  3479. 0: \x{ac01}
  3480. \x{102e0}\x{06d4}\x{1ee4d} [Arabic Coptic] [Arab Rohingya] Arabic
  3481. 0: \x{102e0}\x{6d4}\x{1ee4d}
  3482. \x{102e0}\x{06d4}\x{2cc9} [Arabic Coptic] [Arab Rohingya] Coptic
  3483. 0: \x{102e0}\x{6d4}
  3484. \x{102e0}\x{06d4}\x{10d30} [Arabic Coptic] [Arab Rohingya] Rohingya
  3485. 0: \x{102e0}\x{6d4}
  3486. # Test loop breaking for empty string match
  3487. /^(*sr:A|)*BCD/utf
  3488. AABCD
  3489. 0: AABCD
  3490. ABCD
  3491. 0: ABCD
  3492. BCD
  3493. 0: BCD
  3494. # The use of (*ACCEPT) breaks script run checking
  3495. /^(*sr:.*(*ACCEPT)ZZ)/utf
  3496. \x{1100}\x{2e80}\x{3041}\x{1101} Hangul Han Hiragana Hangul
  3497. 0: \x{1100}\x{2e80}\x{3041}\x{1101} Hangul Han Hiragana Hangul
  3498. # -------
  3499. # Test group names containing non-ASCII letters and digits
  3500. /(?'ABáC'...)\g{ABáC}/utf
  3501. abcabcdefg
  3502. 0: abcabc
  3503. 1: abc
  3504. /(?'XʰABC'...)/utf
  3505. xyzpq
  3506. 0: xyz
  3507. 1: xyz
  3508. /(?'XאABC'...)/utf
  3509. 12345
  3510. 0: 123
  3511. 1: 123
  3512. /(?'XᾈABC'...)/utf
  3513. %^&*(...
  3514. 0: %^&
  3515. 1: %^&
  3516. /(?'𐨐ABC'...)/utf
  3517. abcde
  3518. 0: abc
  3519. 1: abc
  3520. /^(?'אABC'...)(?&אABC)(?P=אABC)/utf
  3521. 123123123456
  3522. 0: 123123123
  3523. 1: 123
  3524. /^(?'אABC'...)(?&אABC)/utf
  3525. 123123123456
  3526. 0: 123123
  3527. 1: 123
  3528. /\X*/
  3529. \xF3aaa\xE4\xEA\xEB\xFEa
  3530. 0: \xf3aaa\xe4\xea\xeb\xfea
  3531. /Я/i,utf
  3532. \x{42f}
  3533. 0: \x{42f}
  3534. \x{44f}
  3535. 0: \x{44f}
  3536. /(?=Я)/i,utf
  3537. \x{42f}
  3538. 0:
  3539. \x{44f}
  3540. 0:
  3541. # -----------------------------------------------------------------------------
  3542. # Tests for bidi control and bidi class properties.
  3543. /\p{ bidi_control }/utf
  3544. -->\x{202c}<--
  3545. 0: \x{202c}
  3546. /\p{bidicontrol}+/utf
  3547. -->\x{061c}\x{200e}\x{200f}\x{202a}\x{202b}\x{202c}\x{202d}<--
  3548. 0: \x{61c}\x{200e}\x{200f}\x{202a}\x{202b}\x{202c}\x{202d}
  3549. -->\x{2066}\x{2067}\x{2068}\x{2069}<--
  3550. 0: \x{2066}\x{2067}\x{2068}\x{2069}
  3551. /\p{bidic}+?/utf
  3552. -->\x{061c}\x{200e}\x{200f}\x{202a}\x{202b}\x{202c}\x{202d}<--
  3553. 0: \x{61c}
  3554. -->\x{2066}\x{2067}\x{2068}\x{2069}<--
  3555. 0: \x{2066}
  3556. /\p{bidi_control}++/utf
  3557. -->\x{061c}\x{200e}\x{200f}\x{202a}\x{202b}\x{202c}\x{202d}<--
  3558. 0: \x{61c}\x{200e}\x{200f}\x{202a}\x{202b}\x{202c}\x{202d}
  3559. -->\x{2066}\x{2067}\x{2068}\x{2069}<--
  3560. 0: \x{2066}\x{2067}\x{2068}\x{2069}
  3561. /[\p{bidi_c}]/utf
  3562. -->\x{202c}<--
  3563. 0: \x{202c}
  3564. /[\p{bidicontrol}]+/utf
  3565. -->\x{061c}\x{200e}\x{200f}\x{202a}\x{202b}\x{202c}\x{202d}<--
  3566. 0: \x{61c}\x{200e}\x{200f}\x{202a}\x{202b}\x{202c}\x{202d}
  3567. -->\x{2066}\x{2067}\x{2068}\x{2069}<--
  3568. 0: \x{2066}\x{2067}\x{2068}\x{2069}
  3569. /[\p{bidicontrol}]+?/utf
  3570. -->\x{061c}\x{200e}\x{200f}\x{202a}\x{202b}\x{202c}\x{202d}<--
  3571. 0: \x{61c}
  3572. -->\x{2066}\x{2067}\x{2068}\x{2069}<--
  3573. 0: \x{2066}
  3574. /[\p{bidicontrol}]++/utf
  3575. -->\x{061c}\x{200e}\x{200f}\x{202a}\x{202b}\x{202c}\x{202d}<--
  3576. 0: \x{61c}\x{200e}\x{200f}\x{202a}\x{202b}\x{202c}\x{202d}
  3577. -->\x{2066}\x{2067}\x{2068}\x{2069}<--
  3578. 0: \x{2066}\x{2067}\x{2068}\x{2069}
  3579. /[\p{bidicontrol}<>]+/utf
  3580. -->\x{061c}\x{200e}\x{200f}\x{202a}\x{202b}\x{202c}\x{202d}<--
  3581. 0: >\x{61c}\x{200e}\x{200f}\x{202a}\x{202b}\x{202c}\x{202d}<
  3582. -->\x{2066}\x{2067}\x{2068}\x{2069}<--
  3583. 0: >\x{2066}\x{2067}\x{2068}\x{2069}<
  3584. /\P{bidicontrol}+/g,utf
  3585. -->\x{061c}\x{200e}\x{200f}\x{202a}\x{202b}\x{202c}\x{202d}<--
  3586. 0: -->
  3587. 0: <--
  3588. -->\x{2066}\x{2067}\x{2068}\x{2069}<--
  3589. 0: -->
  3590. 0: <--
  3591. /\p{^bidicontrol}+/g,utf
  3592. -->\x{061c}\x{200e}\x{200f}\x{202a}\x{202b}\x{202c}\x{202d}<--
  3593. 0: -->
  3594. 0: <--
  3595. -->\x{2066}\x{2067}\x{2068}\x{2069}<--
  3596. 0: -->
  3597. 0: <--
  3598. /\p{bidi class = al}/utf
  3599. -->\x{061D}<--
  3600. 0: \x{61d}
  3601. /\p{bc = al}+/utf
  3602. -->\x{061D}\x{061e}\x{061f}<--
  3603. 0: \x{61d}\x{61e}\x{61f}
  3604. /\p{bidi_class : AL}+?/utf
  3605. -->\x{061D}\x{061e}\x{061f}<--
  3606. 0: \x{61d}
  3607. /\p{Bidi_Class : AL}++/utf
  3608. -->\x{061D}\x{061e}\x{061f}<--
  3609. 0: \x{61d}\x{61e}\x{61f}
  3610. /\p{b_c = aN}+/utf
  3611. -->\x{061D}\x{0602}\x{0604}\x{061f}<--
  3612. 0: \x{602}\x{604}
  3613. /\p{bidi class = B}+/utf
  3614. -->\x{0a}\x{0d}\x{01c}\x{01e}\x{085}\x{2029}<--
  3615. 0: \x{0a}\x{0d}\x{1c}\x{1e}\x{85}\x{2029}
  3616. /\p{bidi class:BN}+/utf
  3617. -->\x{0}\x{08}\x{200c}\x{fffe}\x{dfffe}\x{10ffff}<--
  3618. 0: \x{00}\x{08}\x{200c}\x{fffe}\x{dfffe}\x{10ffff}
  3619. /\p{bidiclass:cs}+/utf
  3620. -->,.\x{060c}\x{ff1a}<--
  3621. 0: ,.\x{60c}\x{ff1a}
  3622. /\p{bidiclass:En}+/utf
  3623. -->09\x{b2}\x{2074}\x{1fbf9}<--
  3624. 0: 09\x{b2}\x{2074}\x{1fbf9}
  3625. /\p{bidiclass:es}+/utf
  3626. ==>+-\x{207a}\x{ff0d}<==
  3627. 0: +-\x{207a}\x{ff0d}
  3628. /\p{bidiclass:et}+/utf
  3629. -->#\{24}%\x{a2}\x{A838}\x{1e2ff}<--
  3630. 0: #
  3631. /\p{bidiclass:FSI}+/utf
  3632. -->\x{2068}<--
  3633. 0: \x{2068}
  3634. /\p{bidi class:L}+/utf
  3635. -->ABC<--
  3636. 0: ABC
  3637. /\P{bidi class:L}+/utf
  3638. -->ABC<--
  3639. 0: -->
  3640. /\p{bidi class:LRE}+\p{bidiclass=lri}*\p{bidiclass:lro}/utf
  3641. -->\x{202a}\x{2066}\x{202d}<--
  3642. 0: \x{202a}\x{2066}\x{202d}
  3643. /\p{bidi class:NSM}+/utf
  3644. -->\x{9bc}\x{a71}\x{e31}<--
  3645. 0: \x{9bc}\x{a71}\x{e31}
  3646. /\p{bidi class:ON}+/utf
  3647. -->\x{21}'()*;@\x{384}\x{2039}<=-
  3648. 0: >!'()*;@\x{384}\x{2039}<=
  3649. /\p{bidiclass:pdf}\p{bidiclass:pdi}/utf
  3650. -->\x{202c}\x{2069}<--
  3651. 0: \x{202c}\x{2069}
  3652. /\p{bidi class:R}+/utf
  3653. -->\x{590}\x{5c6}\x{200f}\x{10805}<--
  3654. 0: \x{590}\x{5c6}\x{200f}\x{10805}
  3655. /\p{bidi class:RLE}+\p{bidi class:RLI}*\p{bidi class:RLO}+/utf
  3656. -->\x{202b}\x{2067}\x{202e}<--
  3657. 0: \x{202b}\x{2067}\x{202e}
  3658. /\p{bidi class:S}+\p{bidiclass:WS}+/utf
  3659. -->\x{9}\x{b}\x{1f} \x{c} \x{2000} \x{3000}<--
  3660. 0: \x{09}\x{0b}\x{1f} \x{0c} \x{2000} \x{3000}
  3661. # -----------------------------------------------------------------------------
  3662. /[\p{taml}\p{sc:ugar}]+/utf
  3663. \x{0b82}\x{10380}
  3664. 0: \x{b82}\x{10380}
  3665. /^[\p{sc:Arabic}]/utf
  3666. \= Expect no match
  3667. \x{650}
  3668. No match
  3669. \x{651}
  3670. No match
  3671. \x{652}
  3672. No match
  3673. \x{653}
  3674. No match
  3675. \x{654}
  3676. No match
  3677. \x{655}
  3678. No match
  3679. # -----------------------------------------------------------------------------
  3680. # Tests for newly-added Boolean Properties
  3681. /\p{ahex}\p{asciihexdigit}/utf
  3682. >4F<
  3683. 0: 4F
  3684. /\p{alpha}\p{alphabetic}/g,utf
  3685. >AB<>\x{148}\x{1234}
  3686. 0: AB
  3687. 0: \x{148}\x{1234}
  3688. /\p{ascii}\p{ascii}/g,utf
  3689. >AB<>\x{148}\x{1234}
  3690. 0: >A
  3691. 0: B<
  3692. /\p{Bidi_C}\p{bidicontrol}/g,utf
  3693. >\x{202d}\x{2069}<
  3694. 0: \x{202d}\x{2069}
  3695. /\p{Bidi_M}\p{bidimirrored}/g,utf
  3696. >\x{202d}\x{2069}<>\x{298b}\x{bb}<
  3697. 0: <>
  3698. 0: \x{298b}\x{bb}
  3699. /\p{cased}\p{cased}/g,utf
  3700. >AN<>\x{149}\x{120}<
  3701. 0: AN
  3702. 0: \x{149}\x{120}
  3703. /\p{caseignorable}\p{ci}/g,utf
  3704. >AN<>\x{60}\x{859}<
  3705. 0: `\x{859}
  3706. /\p{changeswhencasefolded}\p{cwcf}/g,utf
  3707. >AN<>\x{149}\x{120}<
  3708. 0: AN
  3709. 0: \x{149}\x{120}
  3710. /\p{changeswhencasemapped}\p{cwcm}/g,utf
  3711. >AN<>\x{149}\x{120}<
  3712. 0: AN
  3713. 0: \x{149}\x{120}
  3714. /\p{changeswhenlowercased}\p{cwl}/g,utf
  3715. >AN<>\x{149}\x{120}<>yz<
  3716. 0: AN
  3717. /\p{changeswhenuppercased}\p{cwu}/g,utf
  3718. >AN<>\x{149}\x{120}<>yz<
  3719. 0: yz
  3720. /\p{changeswhentitlecased}\p{cwt}/g,utf
  3721. >AN<>\x{149}\x{120}<>yz<
  3722. 0: yz
  3723. /\p{dash}\p{dash}/g,utf
  3724. >\x{2d}\x{1400}<>yz<
  3725. 0: -\x{1400}
  3726. /\p{defaultignorablecodepoint}\p{di}/g,utf
  3727. >AN<>\x{ad}\x{e0fff}<>yz<
  3728. 0: \x{ad}\x{e0fff}
  3729. /\p{deprecated}\p{dep}/g,utf
  3730. >AN<>\x{149}\x{e0001}<>yz<
  3731. 0: \x{149}\x{e0001}
  3732. /\p{diacritic}\p{dia}/g,utf
  3733. >AN<>\x{f84}\x{5e}<>yz<
  3734. 0: \x{f84}^
  3735. /\p{emojicomponent}\p{ecomp}/g,utf
  3736. >AN<>\x{200d}\x{e007f}<>yz<
  3737. 0: \x{200d}\x{e007f}
  3738. /\p{emojimodifier}\p{emod}/g,utf
  3739. >AN<>\x{1f3fb}\x{1f3ff}<>yz<
  3740. 0: \x{1f3fb}\x{1f3ff}
  3741. /\p{emojipresentation}\p{epres}/g,utf
  3742. >AN<>\x{2653}\x{1f6d2}<>yz<
  3743. 0: \x{2653}\x{1f6d2}
  3744. /\p{extender}\p{ext}/g,utf
  3745. >AN<>\x{1e944}\x{b7}<>yz<
  3746. 0: \x{1e944}\x{b7}
  3747. /\p{extendedpictographic}\p{extpict}/g,utf
  3748. >AN<>\x{26cf}\x{ae}<>yz<
  3749. 0: \x{26cf}\x{ae}
  3750. /\p{graphemebase}\p{grbase}/g,utf
  3751. >AN<>\x{10f}\x{60}<>yz<
  3752. 0: >A
  3753. 0: N<
  3754. 0: >\x{10f}
  3755. 0: `<
  3756. 0: >y
  3757. 0: z<
  3758. /\p{graphemeextend}\p{grext}/g,utf
  3759. >AN<>\x{300}\x{b44}<>yz<
  3760. 0: \x{300}\x{b44}
  3761. /\p{hexdigit}\p{hex}/g,utf
  3762. >AF23<>\x{ff46}\x{ff10}<>yz<
  3763. 0: AF
  3764. 0: 23
  3765. 0: \x{ff46}\x{ff10}
  3766. /\p{idcontinue}\p{idc}/g,utf
  3767. >AF23<>\x{146}\x{7a}<>yz<
  3768. 0: AF
  3769. 0: 23
  3770. 0: \x{146}z
  3771. 0: yz
  3772. /\p{ideographic}\p{ideo}/g,utf
  3773. >AF23<>\x{30000}\x{3006}<>yz<
  3774. 0: \x{30000}\x{3006}
  3775. /\p{idstart}\p{ids}/g,utf
  3776. >AF23<>\x{146}\x{7a}<>yz<
  3777. 0: AF
  3778. 0: \x{146}z
  3779. 0: yz
  3780. /\p{idsbinaryoperator}\p{idsb}/g,utf
  3781. >AF23<>\x{2ff0}\x{2ffb}<>yz<\x{2ff2}\x{2ff1}
  3782. 0: \x{2ff0}\x{2ffb}
  3783. /\p{idstrinaryoperator}\p{idst}/g,utf
  3784. >AF23<>\x{2ff2}\x{2ff3}<>yz<
  3785. 0: \x{2ff2}\x{2ff3}
  3786. /\p{Join Control}\p{joinc}/g,utf
  3787. >AF23<>\x{200c}\x{200d}<>yz<
  3788. 0: \x{200c}\x{200d}
  3789. /\p{logical_order_exception}\p{loe}/g,utf
  3790. >AF23<>\x{e40}\x{aabc}<>yz<
  3791. 0: \x{e40}\x{aabc}
  3792. /\p{Lowercase}\p{lower}/g,utf
  3793. >AF23<>\x{146}\x{7a}<>yz<
  3794. 0: \x{146}z
  3795. 0: yz
  3796. /\p{math}\p{math}/g,utf
  3797. >AF23<>\x{2215}\x{2b}<>yz<
  3798. 0: <>
  3799. 0: \x{2215}+
  3800. 0: <>
  3801. /\p{Non Character Code Point}\p{nchar}/g,utf
  3802. >AF23<>\x{10ffff}\x{fdd0}<>yz<
  3803. 0: \x{10ffff}\x{fdd0}
  3804. /\p{patternsyntax}\p{patsyn}/g,utf
  3805. >AF23<>\x{21cd}\x{21}<>yz<
  3806. 0: <>
  3807. 0: \x{21cd}!
  3808. 0: <>
  3809. /\p{patternwhitespace}\p{patws}/g,utf
  3810. >AF23<>\x{2029}\x{85}<>yz<
  3811. 0: \x{2029}\x{85}
  3812. /\p{prependedconcatenationmark}\p{pcm}/g,utf
  3813. >AF23<>\x{600}\x{110cd}<>yz<
  3814. 0: \x{600}\x{110cd}
  3815. /\p{quotationmark}\p{qmark}/g,utf
  3816. >AF23<>\x{ff63}\x{22}<>yz<
  3817. 0: \x{ff63}"
  3818. /\p{radical}\p{radical}/g,utf
  3819. >AF23<>\x{2fd5}\x{2e80}<>yz<
  3820. 0: \x{2fd5}\x{2e80}
  3821. /\p{regionalindicator}\p{ri}/g,utf
  3822. >AF23<>\x{1f1e6}\x{1f1ff}<>yz<
  3823. 0: \x{1f1e6}\x{1f1ff}
  3824. /=\p{whitespace}\p{space}\p{wspace}=/g,utf
  3825. >AF23<=\x{d}\x{1680}\x{3000}=>yz<
  3826. 0: =\x{0d}\x{1680}\x{3000}=
  3827. /\p{sentenceterminal}\p{sterm}/g,utf
  3828. >AF23<>\x{1da88}\x{2e}<>yz<
  3829. 0: \x{1da88}.
  3830. /\p{terminalpunctuation}\p{term}/g,utf
  3831. >AF23<>\x{1da88}\x{2e}<>yz<
  3832. 0: \x{1da88}.
  3833. /\p{unified ideograph}\p{uideo}/g,utf
  3834. >AF23<>\x{30000}\x{3400}<>yz<
  3835. 0: \x{30000}\x{3400}
  3836. /\p{UPPERcase}\p{upper}/g,utf
  3837. >AF23<>\x{146}\x{7a}<>yz<
  3838. 0: AF
  3839. /\p{variationselector}\p{vs}/g,utf
  3840. >AF23<>\x{180b}\x{e01ef}<>yz<
  3841. 0: \x{180b}\x{e01ef}
  3842. /\p{xidcontinue}\p{xidc}/g,utf
  3843. >AF23<>\x{146}\x{30}<>yz<
  3844. 0: AF
  3845. 0: 23
  3846. 0: \x{146}0
  3847. 0: yz
  3848. # -----------------------------------------------------------------------------
  3849. # Variable-length lookbehinds.
  3850. /(?<=áb?c).../g,utf
  3851. ábcdèfgácxyz
  3852. 0: d\x{e8}f
  3853. 0: xyz
  3854. /(?<=PQR|áb?c).../g,utf
  3855. ábcdèfgácxyzPQR123
  3856. 0: d\x{e8}f
  3857. 0: xyz
  3858. 0: 123
  3859. /(?<=áb?c|PQR).../g,utf
  3860. ábcdèfgácxyzPQR123
  3861. 0: d\x{e8}f
  3862. 0: xyz
  3863. 0: 123
  3864. /(?<=PQ|áb?c).../g,utf
  3865. ábcdèfgácxyzPQR123
  3866. 0: d\x{e8}f
  3867. 0: xyz
  3868. 0: R12
  3869. /(?<=áb?c|PQ).../g,utf
  3870. ábcdèfgácxyzPQR123
  3871. 0: d\x{e8}f
  3872. 0: xyz
  3873. 0: R12
  3874. /(?<=á(b?c|d?è?è)f)X./g,utf
  3875. ácfX1zzzáèfX2zzzádèèfX3zzzX4zzz
  3876. 0: X1
  3877. 1: c
  3878. 0: X2
  3879. 1: \x{e8}
  3880. 0: X3
  3881. 1: d\x{e8}\x{e8}
  3882. /(?<!á(b?c|d?è?è)f)X./g,utf
  3883. ácfX1zzzáèfX2zzzádèèfX3zzzX4zzz
  3884. 0: X4
  3885. /(?(?<=áb?c)d|è)/utf
  3886. ábcdèfg
  3887. 0: d
  3888. ácdèfg
  3889. 0: d
  3890. áxdèfg
  3891. 0: \x{e8}
  3892. /(?<=\d{2,3}|áBC)./utf
  3893. áBCD
  3894. 0: D
  3895. /(?<=á(b?c){3}d)X/utf
  3896. ZXácbccdXYZ
  3897. 0: X
  3898. 1: c
  3899. /(?<=á(b?c){0}d)X/utf
  3900. ZXádXYZ
  3901. 0: X
  3902. /(?<=á?(b?c){0}d)X./utf
  3903. ZXádXYZ
  3904. 0: XY
  3905. # --------------------------------------------------------------------------
  3906. /\N{ U+1234 }/utf
  3907. \x{1234}
  3908. 0: \x{1234}
  3909. /\o{ 1234 }/utf
  3910. x\o{1234}y
  3911. 0: \x{29c}
  3912. /\x{ 1234 }/utf
  3913. x\x{1234}y
  3914. 0: \x{1234}
  3915. /\p{ L }/
  3916. 23AB56
  3917. 0: A
  3918. /\w+/utf,ucp
  3919. --cafe\x{300}_au\x{203f}lait!
  3920. 0: cafe\x{300}_au\x{203f}lait
  3921. /[\w]+/utf,ucp
  3922. --cafe\x{300}_au\x{203f}lait!
  3923. 0: cafe\x{300}_au\x{203f}lait
  3924. /[[:word:]]+/utf,ucp
  3925. --cafe\x{300}_au\x{203f}lait!
  3926. 0: cafe\x{300}_au\x{203f}lait
  3927. /[[:xdigit:]]+/utf,ucp
  3928. --123ef\x{ff10}\x{ff19}\x{ff21}\x{ff26}\x{ff1a}
  3929. 0: 123ef\x{ff10}\x{ff19}\x{ff21}\x{ff26}
  3930. /\b.+?\b/utf,ucp
  3931. --cafe\x{300}_au\x{203f}lait!
  3932. 0: cafe\x{300}_au\x{203f}lait
  3933. /caf\B.+?\B/utf,ucp
  3934. --cafe\x{300}_au\x{203f}lait!
  3935. 0: cafe
  3936. # End of testinput4