1 //
   2 // Copyright 1999-2009 Sun Microsystems, Inc.  All Rights Reserved.
   3 // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4 //
   5 // This code is free software; you can redistribute it and/or modify it
   6 // under the terms of the GNU General Public License version 2 only, as
   7 // published by the Free Software Foundation.
   8 //
   9 // This code is distributed in the hope that it will be useful, but WITHOUT
  10 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11 // FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12 // version 2 for more details (a copy is included in the LICENSE file that
  13 // accompanied this code).
  14 //
  15 // You should have received a copy of the GNU General Public License version
  16 // 2 along with this work; if not, write to the Free Software Foundation,
  17 // Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18 //
  19 // Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  20 // CA 95054 USA or visit www.sun.com if you need additional information or
  21 // have any questions.
  22 //
  23 // --------------------------------------------------------
  24 // This file contains test cases with supplementary characters for regular expressions.
  25 // A test case consists of three lines:
  26 // The first line is a pattern used in the test
  27 // The second line is the input to search for the pattern in
  28 // The third line is a concatentation of the match, the number of groups,
  29 //     and the contents of the first four subexpressions.
  30 // Empty lines and lines beginning with comment slashes are ignored.
  31 
  32 // Test unsetting of backed off groups
  33 ^(\ud800\udc61)?\ud800\udc61
  34 \ud800\udc61
  35 true \ud800\udc61 1
  36 
  37 ^(\ud800\udc61\ud800)?\ud800\udc61\ud800
  38 \ud800\udc61\ud800
  39 true \ud800\udc61\ud800 1
  40 
  41 ^(\ud800\udc61\ud800\udc61(\ud800\udc62\ud800\udc62)?)+$
  42 \ud800\udc61\ud800\udc61\ud800\udc62\ud800\udc62\ud800\udc61\ud800\udc61
  43 true \ud800\udc61\ud800\udc61\ud800\udc62\ud800\udc62\ud800\udc61\ud800\udc61 2 \ud800\udc61\ud800\udc61 \ud800\udc62\ud800\udc62
  44 
  45 ^(\ud800\udc61\ud800\udc61\ud800(\ud800\udc62\ud800\udc62\ud800)?)+$
  46 \ud800\udc61\ud800\udc61\ud800\ud800\udc62\ud800\udc62\ud800\ud800\udc61\ud800\udc61\ud800
  47 true \ud800\udc61\ud800\udc61\ud800\ud800\udc62\ud800\udc62\ud800\ud800\udc61\ud800\udc61\ud800 2 \ud800\udc61\ud800\udc61\ud800 \ud800\udc62\ud800\udc62\ud800
  48 
  49 ((\ud800\udc61|\ud800\udc62)?\ud800\udc62)+
  50 \ud800\udc62
  51 true \ud800\udc62 2 \ud800\udc62
  52 
  53 ((\ud800|\ud800\udc62)?\ud800\udc62)+
  54 \ud800\udc62
  55 true \ud800\udc62 2 \ud800\udc62
  56 
  57 (\ud800\udc61\ud800\udc61\ud800\udc61)?\ud800\udc61\ud800\udc61\ud800\udc61
  58 \ud800\udc61\ud800\udc61\ud800\udc61
  59 true \ud800\udc61\ud800\udc61\ud800\udc61 1
  60 
  61 (\ud800\udc61\ud800\udc61\ud800\ud800\udc61)?\ud800\udc61\ud800\udc61\ud800\ud800\udc61
  62 \ud800\udc61\ud800\udc61\ud800\ud800\udc61
  63 true \ud800\udc61\ud800\udc61\ud800\ud800\udc61 1
  64 
  65 ^(\ud800\udc61\ud800(\ud800\udc62\ud800)?)+$
  66 \ud800\udc61\ud800\ud800\udc62\ud800\ud800\udc61\ud800
  67 true \ud800\udc61\ud800\ud800\udc62\ud800\ud800\udc61\ud800 2 \ud800\udc61\ud800 \ud800\udc62\ud800
  68 
  69 ^(\ud800\udc61(\ud800\udc62)?)+$
  70 \ud800\udc61\ud800\udc62\ud800\udc61
  71 true \ud800\udc61\ud800\udc62\ud800\udc61 2 \ud800\udc61 \ud800\udc62
  72 
  73 ^(\ud800\udc61\ud800(\ud800\udc62\ud800)?)+$
  74 \ud800\udc61\ud800\ud800\udc62\ud800\ud800\udc61\ud800
  75 true \ud800\udc61\ud800\ud800\udc62\ud800\ud800\udc61\ud800 2 \ud800\udc61\ud800 \ud800\udc62\ud800
  76 
  77 ^(\ud800\udc61(\ud800\udc62(\ud800\udc63)?)?)?\ud800\udc61\ud800\udc62\ud800\udc63
  78 \ud800\udc61\ud800\udc62\ud800\udc63
  79 true \ud800\udc61\ud800\udc62\ud800\udc63 3
  80 
  81 ^(\ud800\udc61\ud800(\ud800\udc62(\ud800\udc63)?)?)?\ud800\udc61\ud800\ud800\udc62\ud800\udc63
  82 \ud800\udc61\ud800\ud800\udc62\ud800\udc63
  83 true \ud800\udc61\ud800\ud800\udc62\ud800\udc63 3
  84 
  85 ^(\ud800\udc61(\ud800\udc02(\ud800\udc63))).*
  86 \ud800\udc61\ud800\udc02\ud800\udc63
  87 true \ud800\udc61\ud800\udc02\ud800\udc63 3 \ud800\udc61\ud800\udc02\ud800\udc63 \ud800\udc02\ud800\udc63 \ud800\udc63
  88 
  89 ^(\ud800\udc61(\ud800(\ud800\udc63))).*
  90 \ud800\udc61\ud800\ud800\udc63
  91 true \ud800\udc61\ud800\ud800\udc63 3 \ud800\udc61\ud800\ud800\udc63 \ud800\ud800\udc63 \ud800\udc63
  92 
  93 // Patterns including no surrogates
  94 (.)([^a])xyz
  95 \ud801\ud800\udc00xyz
  96 true \ud801\ud800\udc00xyz 2 \ud801 \ud800\udc00
  97 
  98 [^a-z]..
  99 \ud801\ud800\udc00xyz
 100 true \ud801\ud800\udc00x 0
 101 
 102 .$
 103 \ud801\ud800\udc00
 104 true \ud800\udc00 0
 105 
 106 .$
 107 \ud801\udc01\ud800\udc00
 108 true \ud800\udc00 0
 109 
 110 .$
 111 \ud801\udc01\ud800\udc00\udcff
 112 true \udcff 0
 113 
 114 [^x-\uffff][^y-\uffff]
 115 \ud800\udc00pqr
 116 true \ud800\udc00p 0
 117 
 118 [^x-\uffff]+
 119 \ud800\udc00pqrx
 120 true \ud800\udc00pqr 0
 121 
 122 /// The following test cases fail due to use of Start rather than
 123 /// StartS. Disabled for now.
 124 ///[a-\uffff]
 125 ///\ud800\udc00x
 126 ///true x 0
 127 ///
 128 ///[a-\uffff]
 129 ///\ud800\udc00
 130 ///false 0
 131 
 132 // use of x modifier
 133 \ud800\udc61bc(?x)bl\ud800\udc61h
 134 \ud800\udc61bcbl\ud800\udc61h
 135 true \ud800\udc61bcbl\ud800\udc61h 0
 136 
 137 \ud800\udc61bc(?x)  bl\ud800\udc61h
 138 \ud800\udc61bcbl\ud800\udc61h
 139 true \ud800\udc61bcbl\ud800\udc61h 0
 140 
 141 \ud800\udc61bc(?x)  bl\ud800\udc61h  blech
 142 \ud800\udc61bcbl\ud800\udc61hblech
 143 true \ud800\udc61bcbl\ud800\udc61hblech 0
 144 
 145 \ud800\udc61bc(?x)  bl\ud800\udc61h # ignore comment
 146 \ud800\udc61bcbl\ud800\udc61h
 147 true \ud800\udc61bcbl\ud800\udc61h 0
 148 
 149 // Simple alternation
 150 \ud800\udc61|\ud800\udc62
 151 \ud800\udc61
 152 true \ud800\udc61 0
 153 
 154 \ud800\udc61|\ud800\udc62|\ud800
 155 \ud800\udc61
 156 true \ud800\udc61 0
 157 
 158 \ud800\udc61|\ud800
 159 \ud800\udc62
 160 false 0
 161 
 162 \ud800\udc62|\ud800
 163 \ud800
 164 true \ud800 0
 165 
 166 \ud800\udc61|\ud802\udc02
 167 z
 168 false 0
 169 
 170 \ud800\udc61|\ud802\udc02
 171 \ud802\udc02
 172 true \ud802\udc02 0
 173 
 174 \ud800\udc61|\ud802\udc02|\ud803\udc03\ud804\udc04
 175 \ud803\udc03\ud804\udc04
 176 true \ud803\udc03\ud804\udc04 0
 177 
 178 \ud800\udc61|\ud800\udc61d
 179 \ud800\udc61d
 180 true \ud800\udc61 0
 181 
 182 z(\ud800\udc61|\ud800\udc61c)\ud802\udc02
 183 z\ud800\udc61c\ud802\udc02
 184 true z\ud800\udc61c\ud802\udc02 1 \ud800\udc61c
 185 
 186 z(\ud800\udc61|\ud800\udc61c|\udc61c)\ud802\udc02
 187 z\udc61c\ud802\udc02
 188 true z\udc61c\ud802\udc02 1 \udc61c
 189 
 190 // Simple codepoint class
 191 [\ud800\udc61\ud802\udc02c]+
 192 \ud800\udc61\ud802\udc02\ud800\udc61\ud802\udc02\ud800\udc61\ud802\udc02
 193 true \ud800\udc61\ud802\udc02\ud800\udc61\ud802\udc02\ud800\udc61\ud802\udc02 0
 194 
 195 [\ud800\udc61\ud802\udc02c]+
 196 \ud800\udc61\ud802\udc02\ud800\udc61\ud802\udc02\ud800\udc61\ud802\udc02
 197 true \ud800\udc61\ud802\udc02\ud800\udc61\ud802\udc02\ud800\udc61\ud802\udc02 0
 198 
 199 [\ud800\udc61\ud802\udc02c\ud800]+
 200 \ud800\udc61\ud802\udc02\ud800\ud800\udc61\ud802\udc02\ud800\udc61\ud802\udc02
 201 true \ud800\udc61\ud802\udc02\ud800\ud800\udc61\ud802\udc02\ud800\udc61\ud802\udc02 0
 202 
 203 [\ud800\udc61bc]+
 204 d\ud800\udc62fg
 205 false 0
 206 
 207 [\ud800\udc61bc]+[\ud804\udc04ef]+[\ud807\udc07hi]+
 208 zzz\ud800\udc61\ud800\udc61\ud804\udc04\ud804\udc04\ud807\udc07\ud807\udc07zzz
 209 true \ud800\udc61\ud800\udc61\ud804\udc04\ud804\udc04\ud807\udc07\ud807\udc07 0
 210 
 211 // Range codepoint class
 212 [\ud801\udc01-\ud807\udc07]+
 213 \ud8ff\udcff\ud8ff\udcff\ud8ff\udcff\ud807\udc07\ud807\udc07\ud807\udc07
 214 true \ud807\udc07\ud807\udc07\ud807\udc07 0
 215 
 216 [\ud801\udc01-\ud807\udc07]+
 217 mmm
 218 false 0
 219 
 220 [\ud800\udc61-]+
 221 z\ud800\udc61-9z
 222 true \ud800\udc61- 0
 223 
 224 // Negated char class
 225 [^\ud800\udc61\ud802\udc02c]+
 226 \ud800\udc61\ud802\udc02\ud800\udc61\ud802\udc02\ud800\udc61\ud802\udc02
 227 false 0
 228 
 229 [^\ud800\udc61\ud802\udc02\ud803\udc03]+
 230 \ud800\udc61\ud800\udc61\ud800\udc61\ud802\udc02\ud802\udc02\ud802\udc02\ud803\udc03\ud803\udc03\ud803\udc03\ud804\udc04efg
 231 true \ud804\udc04efg 0
 232 
 233 [^\ud800\udc61\ud802\udc02\ud803\udc03\ud800]+
 234 \ud800\udc61\ud800\udc61\ud800\udc61\ud802\udc02\ud802\udc02\ud802\udc02\ud803\udc03\ud803\udc03\ud803\udc03\ud804\udc04efg
 235 true \ud804\udc04efg 0
 236 
 237 // Making sure a ^ not in first position matches literal ^
 238 [\ud801\udc01\ud802\udc02\ud803\udc03^\ud802\udc02]
 239 \ud802\udc02
 240 true \ud802\udc02 0
 241 
 242 [\ud801\udc01\ud802\udc02\ud803\udc03^\ud802\udc02]
 243 ^
 244 true ^ 0
 245 
 246 // Class union and intersection
 247 [\ud801\udc01\ud802\udc02\ud803\udc03[\ud804\udc04\ud805\udc05\ud806\udc06]]
 248 \ud802\udc02
 249 true \ud802\udc02 0
 250 
 251 [\ud800\udc61\ud802\udc02\ud803\udc03[\ud804\udc04\ud805\udc05\ud806\udc06]]
 252 \ud805\udc05
 253 true \ud805\udc05 0
 254 
 255 [\ud801\udc01-\ud804\udc04[0-9][\ud80b\udc0b-\ud80d\udc0d]]
 256 \ud801\udc01
 257 true \ud801\udc01 0
 258 
 259 [\ud801\udc01-\ud804\udc04[0-9][\ud80b\udc0b-\ud80d\udc0d]]
 260 \ud80c\udc0c
 261 true \ud80c\udc0c 0
 262 
 263 [\ud801\udc01-\ud804\udc04[0-9][\ud80b\udc0b-\ud80d\udc0d]]
 264 4
 265 true 4 0
 266 
 267 [\ud801\udc01-\ud804\udc04[0-9][\ud80b\udc0b-\ud80d\udc0d]]
 268 \ud805\udc05
 269 false 0
 270 
 271 [\ud801\udc01-\ud804\udc04[0-9][\ud80b\udc0b-\ud80d\udc0d]]
 272 \ud816\udc16
 273 false 0
 274 
 275 [[\ud801\udc01-\ud804\udc04][0-9][\ud80b\udc0b-\ud80d\udc0d]]
 276 \ud802\udc02
 277 true \ud802\udc02 0
 278 
 279 [[\ud801\udc01-\ud804\udc04][0-9][\ud80b\udc0b-\ud80d\udc0d]]
 280 \ud81a\udc1a
 281 false 0
 282 
 283 [\ud801\udc01-\ud803\udc03[\ud804\udc04-\ud806\udc06[\ud807\udc07-\ud809\udc09]]]
 284 \ud801\udc01
 285 true \ud801\udc01 0
 286 
 287 [\ud801\udc01-\ud803\udc03[\ud804\udc04-\ud806\udc06[\ud807\udc07-\ud809\udc09]]]
 288 \ud805\udc05
 289 true \ud805\udc05 0
 290 
 291 [\ud801\udc01-\ud803\udc03[\ud804\udc04-\ud806\udc06[\ud807\udc07-\ud809\udc09]]]
 292 \ud808\udc08
 293 true \ud808\udc08 0
 294 
 295 [\ud801\udc01-\ud803\udc03[\ud804\udc04-\ud806\udc06[\ud807\udc07-\ud809\udc09]]]
 296 \ud80d\udc0d
 297 false 0
 298 
 299 [\ud801\udc01-\ud803\udc03[\ud804\udc04-\ud806\udc06[\ud807\udc07-\ud809\udc09]]\ud80d\udc0d]
 300 \ud80d\udc0d
 301 true \ud80d\udc0d 0
 302 
 303 [\ud801\udc01\ud802\udc02\ud803\udc03[\ud804\udc04\ud805\udc05\ud806\udc06]\ud807\udc07\ud808\udc08\ud809\udc09]
 304 \ud801\udc01
 305 true \ud801\udc01 0
 306 
 307 [\ud800\udc61\ud802\udc02\ud803\udc03[\ud804\udc04\ud805\udc05\ud806\udc06]\ud807\udc07\ud808\udc08\ud809\udc09]
 308 \ud804\udc04
 309 true \ud804\udc04 0
 310 
 311 [\ud800\udc61\ud802\udc02\ud803\udc03[\ud804\udc04\ud805\udc05\ud806\udc06]\ud807\udc07\ud808\udc08\ud809\udc09]
 312 \ud808\udc08
 313 true \ud808\udc08 0
 314 
 315 [\ud800\udc61\ud802\udc02\ud803\udc03[\ud804\udc04\ud805\udc05\ud806\udc06]\ud807\udc07\ud808\udc08\ud809\udc09]
 316 \ud816\udc16
 317 false 0
 318 
 319 [\ud801\udc01-\ud803\udc03&&[\ud804\udc04-\ud806\udc06]]
 320 \ud801\udc01
 321 false 0
 322 
 323 [\ud801\udc01-\ud803\udc03&&[\ud804\udc04-\ud806\udc06]]
 324 \ud805\udc05
 325 false 0
 326 
 327 [\ud801\udc01-\ud803\udc03&&[\ud804\udc04-\ud806\udc06]]
 328 \ud81a\udc1a
 329 false 0
 330 
 331 [[\ud801\udc01-\ud803\udc03]&&[\ud804\udc04-\ud806\udc06]]
 332 \ud801\udc01
 333 false 0
 334 
 335 [[\ud801\udc01-\ud803\udc03]&&[\ud804\udc04-\ud806\udc06]]
 336 \ud805\udc05
 337 false 0
 338 
 339 [[\ud801\udc01-\ud803\udc03]&&[\ud804\udc04-\ud806\udc06]]
 340 \ud81a\udc1a
 341 false 0
 342 
 343 [\ud801\udc01-\ud803\udc03&&\ud804\udc04-\ud806\udc06]
 344 \ud801\udc01
 345 false 0
 346 
 347 [\ud801\udc01-\ud80d\udc0d&&\ud80d\udc0d-\ud81a\udc1a]
 348 \ud80d\udc0d
 349 true \ud80d\udc0d 0
 350 
 351 [\ud801\udc01-\ud80d\udc0d&&\ud80d\udc0d-\ud81a\udc1a&&\ud801\udc01-\ud803\udc03]
 352 \ud80d\udc0d
 353 false 0
 354 
 355 [\ud801\udc01-\ud80d\udc0d&&\ud80d\udc0d-\ud81a\udc1a&&\ud801\udc01-\ud81a\udc1a]
 356 \ud80d\udc0d
 357 true \ud80d\udc0d 0
 358 
 359 [[\ud801\udc01-\ud80d\udc0d]&&[\ud80d\udc0d-\ud81a\udc1a]]
 360 \ud801\udc01
 361 false 0
 362 
 363 [[\ud801\udc01-\ud80d\udc0d]&&[\ud80d\udc0d-\ud81a\udc1a]]
 364 \ud80d\udc0d
 365 true \ud80d\udc0d 0
 366 
 367 [[\ud801\udc01-\ud80d\udc0d]&&[\ud80d\udc0d-\ud81a\udc1a]]
 368 \ud81a\udc1a
 369 false 0
 370 
 371 [[\ud801\udc01-\ud80d\udc0d]&&[^\ud801\udc01-\ud803\udc03]]
 372 \ud801\udc01
 373 false 0
 374 
 375 [[\ud801\udc01-\ud80d\udc0d]&&[^\ud801\udc01-\ud803\udc03]]
 376 \ud804\udc04
 377 true \ud804\udc04 0
 378 
 379 [\ud801\udc01-\ud80d\udc0d&&[^\ud801\udc01-\ud803\udc03]]
 380 \ud801\udc01
 381 false 0
 382 
 383 [\ud801\udc01-\ud80d\udc0d&&[^\ud801\udc01-\ud803\udc03]]
 384 \ud804\udc04
 385 true \ud804\udc04 0
 386 
 387 [\ud801\udc01-\ud803\udc03\ud804\udc04-\ud806\udc06&&[\ud804\udc04-\ud806\udc06]]
 388 \ud801\udc01
 389 false 0
 390 
 391 [\ud801\udc01-\ud803\udc03\ud804\udc04-\ud806\udc06&&[\ud804\udc04-\ud806\udc06]]
 392 \ud805\udc05
 393 true \ud805\udc05 0
 394 
 395 [[\ud801\udc01-\ud803\udc03]&&\ud804\udc04-\ud806\udc06\ud801\udc01-\ud803\udc03]
 396 \ud801\udc01
 397 true \ud801\udc01 0
 398 
 399 [[\ud801\udc01-\ud803\udc03]&&[\ud804\udc04-\ud806\udc06][\ud801\udc01-\ud803\udc03]]
 400 \ud801\udc01
 401 true \ud801\udc01 0
 402 
 403 [[\ud801\udc01-\ud803\udc03][\ud804\udc04-\ud806\udc06]&&\ud801\udc01\ud802\udc02\ud803\udc03]
 404 \ud801\udc01
 405 true \ud801\udc01 0
 406 
 407 [[\ud801\udc01-\ud803\udc03][\ud804\udc04-\ud806\udc06]&&\ud801\udc01\ud802\udc02\ud803\udc03[\ud804\udc04\ud805\udc05\ud806\udc06]]
 408 \ud805\udc05
 409 true \ud805\udc05 0
 410 
 411 [[\ud801\udc01-\ud803\udc03]&&[\ud802\udc02-\ud804\udc04]&&[\ud803\udc03-\ud805\udc05]]
 412 \ud801\udc01
 413 false 0
 414 
 415 [[\ud801\udc01-\ud803\udc03]&&[\ud802\udc02-\ud804\udc04]&&[\ud803\udc03-\ud805\udc05]]
 416 \ud803\udc03
 417 true \ud803\udc03 0
 418 
 419 [[\ud801\udc01-\ud803\udc03]&&[\ud802\udc02-\ud804\udc04][\ud803\udc03-\ud805\udc05]&&[\ud815\udc15-\ud81a\udc1a]]
 420 \ud803\udc03
 421 false 0
 422 
 423 [\ud801\udc01\ud802\udc02\ud803\udc03[^\ud802\udc02\ud803\udc03\ud804\udc04]]
 424 \ud801\udc01
 425 true \ud801\udc01 0
 426 
 427 [\ud800\udc61\ud802\udc02\ud803\udc03[^\ud802\udc02\ud803\udc03\ud804\udc04]]
 428 \ud804\udc04
 429 false 0
 430 
 431 [\ud801\udc01-\ud803\udc03&&\ud801\udc01-\ud804\udc04&&\ud801\udc01-\ud805\udc05\ud807\udc07\ud808\udc08\ud809\udc09]
 432 \ud802\udc02
 433 true \ud802\udc02 0
 434 
 435 [\ud801\udc01-\ud803\udc03&&\ud801\udc01-\ud804\udc04&&\ud801\udc01-\ud805\udc05\ud807\udc07\ud808\udc08\ud809\udc09]
 436 \ud807\udc07
 437 false 0
 438 
 439 [[\ud801\udc01[\ud802\udc02]]&&[\ud802\udc02[\ud801\udc01]]]
 440 \ud801\udc01
 441 true \ud801\udc01 0
 442 
 443 // Unicode isn't supported in clazz()
 444 [[\ud800\udc61]&&[b][c][\ud800\udc61]&&[^d]]
 445 \ud800\udc61
 446 true \ud800\udc61 0
 447 
 448 [[\ud800\udc61]&&[\ud802\udc02][\ud800][\ud800\udc61]&&[^\ud804\udc04]]
 449 \ud800\udc61
 450 true \ud800\udc61 0
 451 
 452 [[\ud800\udc61]&&[b][\ud800][\ud800\udc61]&&[^\ud804\udc04]]
 453 \ud804\udc04
 454 false 0
 455 
 456 [[\ud800\udc61]&&[b][c][\ud800\udc61]&&[^d]]
 457 d
 458 false 0
 459 
 460 [[[\ud800\udc01-\ud800\udc04]&&[\ud800\udc03-\ud800\udc06]]]
 461 \ud800\udc01
 462 false 0
 463 
 464 [[[\ud800\udc01-\ud800\udc04]&&[\ud800\udc03-\ud800\udc06]]]
 465 \ud800\udc03
 466 true \ud800\udc03 0
 467 
 468 [[[\ud800\udc01-\ud800\udc04]&&[\ud800\udc03-\ud800\udc06]]&&[\ud800\udc03]]
 469 \ud800\udc03
 470 true \ud800\udc03 0
 471 
 472 [[[\ud800\udc01-\ud800\udc04]&&[\ud800\udc03-\ud800\udc06]]&&[\ud800\udc03]&&\ud800\udc03]
 473 \ud800\udc03
 474 true \ud800\udc03 0
 475 
 476 [[[\ud800\udc01-\ud800\udc04]&&[\ud800\udc03-\ud800\udc06]]&&[\ud800\udc03]&&\ud800\udc03&&\ud800\udc03]
 477 \ud800\udc03
 478 true \ud800\udc03 0
 479 
 480 [[[\ud800\udc01-\ud800\udc04]&&[\ud800\udc03-\ud800\udc06]]&&[\ud800\udc03]&&\ud800\udc03&&[\ud800\udc03\ud800\udc04\ud800\udc05]]
 481 \ud800\udc03
 482 true \ud800\udc03 0
 483 
 484 [z[\ud800\udc61b\ud800\udc03&&b\ud800\udc03\ud800\udc04]]
 485 \ud800\udc03
 486 true \ud800\udc03 0
 487 
 488 [z[\ud800\udc61b\ud800\udc03&&b\ud800\udc03\ud800\udc04]&&[u-z]]
 489 z
 490 true z 0
 491 
 492 [x[\ud800\udc61b\ud800\udc03&&b\ud800\udc03\ud800\udc04[z]]&&[u-z]]
 493 z
 494 false 0
 495 
 496 [x[[wz]\ud800\udc61b\ud800\udc03&&b\ud800\udc03\ud800\udc04[z]]&&[u-z]]
 497 z
 498 true z 0
 499 
 500 [[\ud800\udc61b\ud800\udc03]&&[\ud800\udc04\ud800\udc05f]\ud800\udc61b\ud800\udc03]
 501 \ud800\udc61
 502 true \ud800\udc61 0
 503 
 504 [[\ud800\udc61b\ud800\udc03]&&[\ud800\udc04\ud800\udc05f]xyz[\ud800\udc61b\ud800\udc03]]
 505 \ud800\udc61
 506 true \ud800\udc61 0
 507 
 508 \pL
 509 \ud800\udc00
 510 true \ud800\udc00 0
 511 
 512 \p{IsASCII}
 513 \ud800\udc00
 514 false 0
 515 
 516 \pLbc
 517 \ud800\udc00bc
 518 true \ud800\udc00bc 0
 519 
 520 \ud800\udc61[r\p{InGreek}]c
 521 \ud800\udc61\u0370c
 522 true \ud800\udc61\u0370c 0
 523 
 524 \ud800\udc61\p{InGreek}
 525 \ud800\udc61\u0370
 526 true \ud800\udc61\u0370 0
 527 
 528 \ud800\udc61\P{InGreek}
 529 \ud800\udc61\u0370
 530 false 0
 531 
 532 \ud800\udc61\P{InGreek}
 533 \ud800\udc61b
 534 true \ud800\udc61b 0
 535 
 536 \ud800\udc61{^InGreek}
 537 -
 538 error
 539 
 540 \ud800\udc61\p{^InGreek}
 541 -
 542 error
 543 
 544 \ud800\udc61\P{^InGreek}
 545 -
 546 error
 547 
 548 \ud800\udc61\p{InGreek}
 549 \ud800\udc61\u0370
 550 true \ud800\udc61\u0370 0
 551 
 552 \ud800\udc61[\p{InGreek}]c
 553 \ud800\udc61\u0370c
 554 true \ud800\udc61\u0370c 0
 555 
 556 \ud800\udc61[\P{InGreek}]c
 557 \ud800\udc61\u0370c
 558 false 0
 559 
 560 \ud800\udc61[\P{InGreek}]c
 561 \ud800\udc61bc
 562 true \ud800\udc61bc 0
 563 
 564 \ud800\udc61[{^InGreek}]c
 565 \ud800\udc61nc
 566 true \ud800\udc61nc 0
 567 
 568 \ud800\udc61[{^InGreek}]c
 569 \ud800\udc61zc
 570 false 0
 571 
 572 \ud800\udc61[\p{^InGreek}]c
 573 -
 574 error
 575 
 576 \ud800\udc61[\P{^InGreek}]c
 577 -
 578 error
 579 
 580 \ud800\udc61[\p{InGreek}]
 581 \ud800\udc61\u0370
 582 true \ud800\udc61\u0370 0
 583 
 584 \ud800\udc61[r\p{InGreek}]c
 585 \ud800\udc61rc
 586 true \ud800\udc61rc 0
 587 
 588 \ud800\udc61[\p{InGreek}r]c
 589 \ud800\udc61rc
 590 true \ud800\udc61rc 0
 591 
 592 \ud800\udc61[r\p{InGreek}]c
 593 \ud800\udc61rc
 594 true \ud800\udc61rc 0
 595 
 596 \ud800\udc61[^\p{InGreek}]c
 597 \ud800\udc61\u0370c
 598 false 0
 599 
 600 \ud800\udc61[^\P{InGreek}]c
 601 \ud800\udc61\u0370c
 602 true \ud800\udc61\u0370c 0
 603 
 604 \ud800\udc61[\p{InGreek}&&[^\u0370]]c
 605 \ud800\udc61\u0370c
 606 false 0
 607 
 608 // Test the dot metacharacter
 609 \ud800\udc61.c.+
 610 \ud800\udc61#c%&
 611 true \ud800\udc61#c%& 0
 612 
 613 \ud800\udc61b.
 614 \ud800\udc61b\n
 615 false 0
 616 
 617 (?s)\ud800\udc61b.
 618 \ud800\udc61b\n
 619 true \ud800\udc61b\n 0
 620 
 621 \ud800\udc61[\p{L}&&[\P{InGreek}]]c
 622 \ud800\udc61\u6000c
 623 true \ud800\udc61\u6000c 0
 624 
 625 \ud800\udc61[\p{L}&&[\P{InGreek}]]c
 626 \ud800\udc61rc
 627 true \ud800\udc61rc 0
 628 
 629 \ud800\udc61[\p{L}&&[\P{InGreek}]]c
 630 \ud800\udc61\u0370c
 631 false 0
 632 
 633 \ud800\udc61\p{InGreek}c
 634 \ud800\udc61\u0370c
 635 true \ud800\udc61\u0370c 0
 636 
 637 \ud800\udc61\p{Sc}
 638 \ud800\udc61$
 639 true \ud800\udc61$ 0
 640 
 641 // Test \p{L}
 642 \p{L}
 643 \ud800\udf1e
 644 true \ud800\udf1e 0
 645 
 646 ^a\p{L}z$
 647 a\ud800\udf1ez
 648 true a\ud800\udf1ez 0
 649 
 650 // Test \P{InDeseret}
 651 
 652 \ud800\udf00\p{L}{2,3}\P{L}*supp->\ud900\udc00<-\P{InDeseret}
 653 \ud800\udf00\ud800\udf1e\ud800\udf1esupp->\ud900\udc00<-\ud901\udf00
 654 true \ud800\udf00\ud800\udf1e\ud800\udf1esupp->\ud900\udc00<-\ud901\udf00 0
 655 
 656 \ud800\udf00\p{L}{2,3}\P{L}*supp->\ud900\udc00<-\P{InDeseret}
 657 \ud800\udf00\ud800\udf1e\ud800\udf1e\ud901\udf00supp->\ud900\udc00<-\ud901\udf00
 658 true \ud800\udf00\ud800\udf1e\ud800\udf1e\ud901\udf00supp->\ud900\udc00<-\ud901\udf00 0
 659 
 660 // Test \p{InDeseret}
 661 \ud800\udf00\p{L}{2,3}\P{L}*supp->\ud900\udc00<-\p{InDeseret}
 662 \ud800\udf00\ud800\udf1e\ud800\udf1e\ud901\udf00supp->\ud900\udc00<-\ud801\udc00
 663 true \ud800\udf00\ud800\udf1e\ud800\udf1e\ud901\udf00supp->\ud900\udc00<-\ud801\udc00 0
 664 
 665 // Test the word char escape sequence
 666 \ud800\udc61b\wc
 667 \ud800\udc61bcc
 668 true \ud800\udc61bcc 0
 669 
 670 \ud800\udc61bc[\w]
 671 \ud800\udc61bcd
 672 true \ud800\udc61bcd 0
 673 
 674 \ud800\udc61bc[\sdef]*
 675 \ud800\udc61bc  def
 676 true \ud800\udc61bc  def 0
 677 
 678 \ud800\udc61bc[\sy-z]*
 679 \ud800\udc61bc y z
 680 true \ud800\udc61bc y z 0
 681 
 682 \ud800\udc01bc[\ud800\udc01-\ud800\udc04\sm-p]*
 683 \ud800\udc01bc\ud800\udc01\ud800\udc01 mn  p
 684 true \ud800\udc01bc\ud800\udc01\ud800\udc01 mn  p 0
 685 
 686 // Test the whitespace escape sequence
 687 \ud800\udc61b\s\ud800\udc03
 688 \ud800\udc61b \ud800\udc03
 689 true \ud800\udc61b \ud800\udc03 0
 690 
 691 \s\s\s
 692 bl\ud800\udc61h  err
 693 false 0
 694 
 695 \S\S\s
 696 bl\ud800\udc61h  err
 697 true \ud800\udc61h  0
 698 
 699 // Test the digit escape sequence
 700 \ud800\udc61b\d\ud800\udc03
 701 \ud800\udc61b9\ud800\udc03
 702 true \ud800\udc61b9\ud800\udc03 0
 703 
 704 \d\d\d
 705 bl\ud800\udc61h45
 706 false 0
 707 
 708 // Test the caret metacharacter
 709 ^\ud800\udc61bc
 710 \ud800\udc61bcdef
 711 true \ud800\udc61bc 0
 712 
 713 ^\ud800\udc61bc
 714 bcd\ud800\udc61bc
 715 false 0
 716 
 717 // Greedy ? metacharacter
 718 \ud800\udc61?\ud800\udc02
 719 \ud800\udc61\ud800\udc61\ud800\udc61\ud800\udc61\ud800\udc02
 720 true \ud800\udc61\ud800\udc02 0
 721 
 722 \udc61?\ud800\udc02
 723 \ud800\udc61\udc61\udc61\ud800\udc02
 724 true \udc61\ud800\udc02 0
 725 
 726 \ud800\udc61?\ud800\udc02
 727 \ud800\udc02
 728 true \ud800\udc02 0
 729 
 730 \ud800?\ud800\udc02
 731 \ud800\udc02
 732 true \ud800\udc02 0
 733 
 734 \ud800\udc61?\ud800\udc02
 735 \ud800\udc61\ud800\udc61\ud800\udc61\ud800\udc03\ud800\udc03\ud800\udc03
 736 false 0
 737 
 738 .?\ud800\udc02
 739 \ud800\udc61\ud800\udc61\ud800\udc61\ud800\udc61\ud800\udc02
 740 true \ud800\udc61\ud800\udc02 0
 741 
 742 // Reluctant ? metacharacter
 743 \ud800\udc61??\ud800\udc02
 744 \ud800\udc61\ud800\udc61\ud800\udc61\ud800\udc61\ud800\udc02
 745 true \ud800\udc61\ud800\udc02 0
 746 
 747 \ud800??\ud800\udc02
 748 \ud800\ud800\ud8001\ud800\ud800\udc02
 749 true \ud800\ud800\udc02 0
 750 
 751 \ud800\udc61??\ud800\udc02
 752 \ud800\udc02
 753 true \ud800\udc02 0
 754 
 755 \ud800??\ud800\udc02
 756 \ud800\udc02
 757 true \ud800\udc02 0
 758 
 759 \ud800\udc61??\ud800\udc02
 760 \ud800\udc61\ud800\udc61\ud800\udc61ccc
 761 false 0
 762 
 763 .??\ud800\udc02
 764 \ud800\udc61\ud800\udc61\ud800\udc61\ud800\udc61\ud800\udc02
 765 true \ud800\udc61\ud800\udc02 0
 766 
 767 // Possessive ? metacharacter
 768 \ud800\udc61?+\ud800\udc02
 769 \ud800\udc61\ud800\udc61\ud800\udc61\ud800\udc61\ud800\udc02
 770 true \ud800\udc61\ud800\udc02 0
 771 
 772 \ud800\udc61?+\ud800\udc02
 773 \ud800\udc02
 774 true \ud800\udc02 0
 775 
 776 \ud800\udc61?+\ud800\udc02
 777 \ud800\udc61\ud800\udc61\ud800\udc61ccc
 778 false 0
 779 
 780 .?+\ud800\udc02
 781 \ud800\udc61\ud800\udc61\ud800\udc61\ud800\udc61\ud800\udc02
 782 true \ud800\udc61\ud800\udc02 0
 783 
 784 // Greedy + metacharacter
 785 \ud800\udc61+\ud800\udc02
 786 \ud800\udc61\ud800\udc61\ud800\udc61\ud800\udc61\ud800\udc02
 787 true \ud800\udc61\ud800\udc61\ud800\udc61\ud800\udc61\ud800\udc02 0
 788 
 789 \udc61+\ud800\udc02
 790 \ud800\udc61\udc61\udc61\udc61\ud800\udc02
 791 true \udc61\udc61\udc61\ud800\udc02 0
 792 
 793 \ud800\udc61+\ud800\udc02
 794 \ud800\udc02
 795 false 0
 796 
 797 \ud800+\ud800\udc02
 798 \ud800\udc02
 799 false 0
 800 
 801 \ud800\udc61+\ud800\udc02
 802 \ud800\udc61\ud800\udc61\ud800\udc61ccc
 803 false 0
 804 
 805 .+\ud800\udc02
 806 \ud800\udc61\ud800\udc61\ud800\udc61\ud800\udc61\ud800\udc02
 807 true \ud800\udc61\ud800\udc61\ud800\udc61\ud800\udc61\ud800\udc02 0
 808 
 809 .+\ud800\udc02
 810 \ud800\udc61\udc61\udc61\udc61\ud800\udc02
 811 true \ud800\udc61\udc61\udc61\udc61\ud800\udc02 0
 812 
 813 // Reluctant + metacharacter
 814 \ud800\udc61+?\ud800\udc02
 815 \ud800\udc61\ud800\udc61\ud800\udc61\ud800\udc61\ud800\udc02
 816 true \ud800\udc61\ud800\udc61\ud800\udc61\ud800\udc61\ud800\udc02 0
 817 
 818 \udc61+?\ud800\udc02
 819 \udc61\udc61\udc61\udc61\ud800\udc02
 820 true \udc61\udc61\udc61\udc61\ud800\udc02 0
 821 
 822 \ud800\udc61+?\ud800\udc02
 823 \ud800\udc02
 824 false 0
 825 
 826 \ud800+?\ud800\udc02
 827 \ud800\udc02
 828 false 0
 829 
 830 \ud800\udc61+?\ud800\udc02
 831 \ud800\udc61\ud800\udc61\ud800\udc61ccc
 832 false 0
 833 
 834 .+?\ud800\udc02
 835 \ud800\udc61\ud800\udc61\ud800\udc61\ud800\udc61\ud800\udc02
 836 true \ud800\udc61\ud800\udc61\ud800\udc61\ud800\udc61\ud800\udc02 0
 837 
 838 // Possessive + metacharacter
 839 \ud800\udc61++\ud800\udc02
 840 \ud800\udc61\ud800\udc61\ud800\udc61\ud800\udc61\ud800\udc02
 841 true \ud800\udc61\ud800\udc61\ud800\udc61\ud800\udc61\ud800\udc02 0
 842 
 843 \ud800\udc61++\ud800\udc02
 844 \ud800\udc02
 845 false 0
 846 
 847 \ud800\udc61++\ud800\udc02
 848 \ud800\udc61\ud800\udc61\ud800\udc61ccc
 849 false 0
 850 
 851 .++\ud800\udc02
 852 \ud800\udc61\ud800\udc61\ud800\udc61\ud800\udc61\ud800\udc02
 853 false 0
 854 
 855 // Greedy Repetition
 856 \ud800\udc61{2,3}
 857 \ud800\udc61
 858 false 0
 859 
 860 \ud800\udc61{2,3}
 861 \ud800\udc61\ud800\udc61
 862 true \ud800\udc61\ud800\udc61 0
 863 
 864 \ud800\udc61{2,3}
 865 \ud800\udc61\ud800\udc61\ud800\udc61
 866 true \ud800\udc61\ud800\udc61\ud800\udc61 0
 867 
 868 \ud800\udc61{2,3}
 869 \ud800\udc61\ud800\udc61\ud800\udc61\ud800\udc61
 870 true \ud800\udc61\ud800\udc61\ud800\udc61 0
 871 
 872 \ud800\udc61{3,}
 873 zzz\ud800\udc61\ud800\udc61\ud800\udc61\ud800\udc61zzz
 874 true \ud800\udc61\ud800\udc61\ud800\udc61\ud800\udc61 0
 875 
 876 \ud800\udc61{3,}
 877 zzz\ud800\udc61\ud800\udc61zzz
 878 false 0
 879 
 880 // Reluctant Repetition
 881 \ud800\udc61{2,3}?
 882 \ud800\udc61
 883 false 0
 884 
 885 \ud800\udc61{2,3}?
 886 \ud800\udc61\ud800\udc61
 887 true \ud800\udc61\ud800\udc61 0
 888 
 889 \ud800\udc61{2,3}?
 890 \ud800\udc61\ud800\udc61\ud800\udc61
 891 true \ud800\udc61\ud800\udc61 0
 892 
 893 \ud800\udc61{2,3}?
 894 \ud800\udc61\ud800\udc61\ud800\udc61\ud800\udc61
 895 true \ud800\udc61\ud800\udc61 0
 896 
 897 // Zero width Positive lookahead
 898 \ud800\udc61\ud802\udc02\ud803\udc03(?=\ud804\udc04)
 899 zzz\ud800\udc61\ud802\udc02\ud803\udc03\ud804\udc04
 900 true \ud800\udc61\ud802\udc02\ud803\udc03 0
 901 
 902 \ud800\udc61\ud802\udc02\ud803\udc03(?=\ud804\udc04)
 903 zzz\ud800\udc61\ud802\udc02\ud803\udc03e\ud804\udc04
 904 false 0
 905 
 906 \ud800\udc61\ud802\udc02\ud803\udc03(?=\udcff\ud804\udc04)
 907 zzz\ud800\udc61\ud802\udc02\ud803\udc03\udcff\ud804\udc04
 908 true \ud800\udc61\ud802\udc02\ud803\udc03 0
 909 
 910 \ud800\udc61\ud802\udc02\ud803\udc03(?=\udcff\ud804\udc04)
 911 zzz\ud800\udc61\ud802\udc02\ud803\udc03\ud8ff\udcff\ud804\udc04
 912 false 0
 913 
 914 // Zero width Negative lookahead
 915 \ud800\udc61\ud802\udc02\ud803\udc03(?!\ud804\udc04)
 916 zz\ud800\udc61\ud802\udc02\ud803\udc03\ud804\udc04
 917 false 0
 918 
 919 a\ud802\udc02\ud803\udc03(?!\ud804\udc04)
 920 zza\ud802\udc02\ud803\udc03\udc04\ud804\udc04
 921 true a\ud802\udc02\ud803\udc03 0
 922 
 923 \ud800\udc61\ud802\udc02\ud803\udc03(?!\ud804\udc04\ud8ff)
 924 zz\ud800\udc61\ud802\udc02\ud803\udc03\ud804\udc04\ud8ffX
 925 false 0
 926 
 927 a\ud802\udc02\ud803\udc03(?!\ud804\udc04\ud8ff)
 928 zza\ud802\udc02\ud803\udc03e\ud804\udc04\ud8ff\udcff
 929 true a\ud802\udc02\ud803\udc03 0
 930 
 931 // Zero width Positive lookbehind
 932 (?<=\ud801\udc01\ud802\udc02)\ud803\udc03
 933 \ud801\udc01\ud802\udc02\ud803\udc03
 934 true \ud803\udc03 0
 935 
 936 // Zero width Negative lookbehind
 937 (?<!\ud801\udc01)\ud802\udc02\ud803\udc03
 938 ###\ud800\udc00\ud802\udc02\ud803\udc03
 939 true \ud802\udc02\ud803\udc03 0
 940 
 941 (?<![\ud801\udc01\ud802\udc02])\ud803\udc03.
 942 \ud801\udc01\ud803\udc03x\ud800\udc00\ud803\udc03y
 943 true \ud803\udc03y 0
 944 
 945 (?<!\ud801\udc01)\ud803\udc03
 946 \ud801\udc01\ud803\udc03
 947 false 0
 948 
 949 // Nondeterministic group
 950 (\ud800\udc61+\ud802)+
 951 \ud800\udc61\ud802\ud800\udc61\ud802\ud800\udc61\ud802
 952 true \ud800\udc61\ud802\ud800\udc61\ud802\ud800\udc61\ud802 1 \ud800\udc61\ud802
 953 
 954 (\ud800\udc61|\ud802)+
 955 \ud800\ud802\udc61\ud803\ud802\udc61
 956 false 1
 957 
 958 // Deterministic group
 959 (\ud800\udc61\ud802)+
 960 \ud800\udc61\ud802\ud800\udc61\ud802\ud800\udc61\ud802
 961 true \ud800\udc61\ud802\ud800\udc61\ud802\ud800\udc61\ud802 1 \ud800\udc61\ud802
 962 
 963 (\ud800\udc61\ud802)+
 964 \ud800\udc61ccccd
 965 false 1
 966 
 967 (\ud800\udc61\ud802)*
 968 \ud800\udc61\ud802\ud800\udc61\ud802\ud800\udc61\ud802
 969 true \ud800\udc61\ud802\ud800\udc61\ud802\ud800\udc61\ud802 1 \ud800\udc61\ud802
 970 
 971 (\ud800\udc61b)(cd*)
 972 zzz\ud800\udc61bczzz
 973 true \ud800\udc61bc 2 \ud800\udc61b c
 974 
 975 \ud800\udc61bc(\ud804\udc04)*\ud800\udc61bc
 976 \ud800\udc61bc\ud804\udc04\ud804\udc04\ud804\udc04\ud804\udc04\ud804\udc04\ud800\udc61bc
 977 true \ud800\udc61bc\ud804\udc04\ud804\udc04\ud804\udc04\ud804\udc04\ud804\udc04\ud800\udc61bc 1 \ud804\udc04
 978 
 979 // Back references
 980 (\ud800\udc61*)\ud802\udc02c\1
 981 zzz\ud800\udc61\ud800\udc61\ud802\udc02c\ud800\udc61\ud800\udc61zzz
 982 true \ud800\udc61\ud800\udc61\ud802\udc02c\ud800\udc61\ud800\udc61 1 \ud800\udc61\ud800\udc61
 983 
 984 (\ud800\udc61*)\ud802\udc02c\1
 985 zzz\ud800\udc61\ud800\udc61\ud802\udc02c\ud800\udc61zzz
 986 true \ud800\udc61\ud802\udc02c\ud800\udc61 1 \ud800\udc61
 987 
 988 (\ud800\udc07\ud800\udc14*)(\ud804\udc04\ud804\udc04e)*(yu)\1\3(vv)
 989 zzz\ud800\udc07\ud800\udc14\ud800\udc14\ud804\udc04\ud804\udc04e\ud804\udc04\ud804\udc04eyu\ud800\udc07\ud800\udc14\ud800\udc14yuvvzzz
 990 true \ud800\udc07\ud800\udc14\ud800\udc14\ud804\udc04\ud804\udc04e\ud804\udc04\ud804\udc04eyu\ud800\udc07\ud800\udc14\ud800\udc14yuvv 4 \ud800\udc07\ud800\udc14\ud800\udc14 \ud804\udc04\ud804\udc04e yu vv
 991 
 992 // Greedy * metacharacter
 993 \ud800\udc61*\ud802\udc02
 994 \ud800\udc61\ud800\udc61\ud800\udc61\ud800\udc61\ud802\udc02
 995 true \ud800\udc61\ud800\udc61\ud800\udc61\ud800\udc61\ud802\udc02 0
 996 
 997 \ud800\udc61*\ud802\udc02
 998 \ud802\udc02
 999 true \ud802\udc02 0
1000 
1001 \ud800\udc61*\ud802\udc02
1002 \ud800\udc61\ud800\udc61\ud800\udc61ccc
1003 false 0
1004 
1005 .*\ud802\udc02
1006 \ud800\udc61\ud800\udc61\ud800\udc61\ud800\udc61\ud802\udc02
1007 true \ud800\udc61\ud800\udc61\ud800\udc61\ud800\udc61\ud802\udc02 0
1008 
1009 // Reluctant * metacharacter
1010 \ud800\udc61*?\ud802\udc02
1011 \ud800\udc61\ud800\udc61\ud800\udc61\ud800\udc61\ud802\udc02
1012 true \ud800\udc61\ud800\udc61\ud800\udc61\ud800\udc61\ud802\udc02 0
1013 
1014 \ud800\udc61*?\ud802\udc02
1015 \ud802\udc02
1016 true \ud802\udc02 0
1017 
1018 \ud800\udc61*?\ud802\udc02
1019 \ud800\udc61\ud800\udc61\ud800\udc61ccc
1020 false 0
1021 
1022 .*?\ud802\udc02
1023 \ud800\udc61\ud800\udc61\ud800\udc61\ud800\udc61\ud802\udc02
1024 true \ud800\udc61\ud800\udc61\ud800\udc61\ud800\udc61\ud802\udc02 0
1025 
1026 // Possessive * metacharacter
1027 \ud800\udc61*+\ud802\udc02
1028 \ud800\udc61\ud800\udc61\ud800\udc61\ud800\udc61\ud802\udc02
1029 true \ud800\udc61\ud800\udc61\ud800\udc61\ud800\udc61\ud802\udc02 0
1030 
1031 \ud800\udc61*+\ud802\udc02
1032 \ud802\udc02
1033 true \ud802\udc02 0
1034 
1035 \ud800\udc61*+\ud802\udc02
1036 \ud800\udc61\ud800\udc61\ud800\udc61ccc
1037 false 0
1038 
1039 .*+\ud802\udc02
1040 \ud800\udc61\ud800\udc61\ud800\udc61\ud800\udc61\ud802\udc02
1041 false 0
1042 
1043 // Case insensitivity
1044 (?iu)\ud801\udc00\ud801\udc01\ud801\udc02x
1045 \ud801\udc28\ud801\udc29\ud801\udc2aX
1046 true \ud801\udc28\ud801\udc29\ud801\udc2aX 0
1047 
1048 \ud801\udc00(?iu)\ud801\udc01\ud801\udc02
1049 \ud801\udc00\ud801\udc29\ud801\udc2a
1050 true \ud801\udc00\ud801\udc29\ud801\udc2a 0
1051 
1052 \ud801\udc00(?iu)\ud801\udc01\ud801\udc02
1053 \ud801\udc28\ud801\udc29\ud801\udc2a
1054 false 0
1055 
1056 (?iu)\ud801\udc00[\ud801\udc01\ud801\udc02]+
1057 \ud801\udc28\ud801\udc29\ud801\udc2a
1058 true \ud801\udc28\ud801\udc29\ud801\udc2a 0
1059 
1060 (?iu)[\ud801\udc00-\ud801\udc02]+
1061 \ud801\udc28\ud801\udc29\ud801\udc2a
1062 true \ud801\udc28\ud801\udc29\ud801\udc2a 0
1063 
1064 // Disable metacharacters- test both length <=3 and >3
1065 // So that the BM optimization is part of test
1066 \Q***\E\ud801\udc01\ud802\udc02\ud800\udc03
1067 ***\ud801\udc01\ud802\udc02\ud800\udc03
1068 true ***\ud801\udc01\ud802\udc02\ud800\udc03 0
1069 
1070 \ud802\udc02l\Q***\E\ud801\udc01\ud802\udc02\ud800\udc03
1071 \ud802\udc02l***\ud801\udc01\ud802\udc02\ud800\udc03
1072 true \ud802\udc02l***\ud801\udc01\ud802\udc02\ud800\udc03 0
1073 
1074 \Q***\ud801\udc01\ud802\udc02\ud800\udc03
1075 ***\ud801\udc01\ud802\udc02\ud800\udc03
1076 true ***\ud801\udc01\ud802\udc02\ud800\udc03 0
1077 
1078 \ud802\udc02l\ud801\udc01h\Q***\E\ud801\udc01\ud802\udc02\ud800\udc03
1079 \ud802\udc02l\ud801\udc01h***\ud801\udc01\ud802\udc02\ud800\udc03
1080 true \ud802\udc02l\ud801\udc01h***\ud801\udc01\ud802\udc02\ud800\udc03 0
1081 
1082 \Q***\ud801\udc01\ud802\udc02\ud800\udc03
1083 ***\ud801\udc01\ud802\udc02\ud800\udc03
1084 true ***\ud801\udc01\ud802\udc02\ud800\udc03 0
1085 
1086 \Q*\ud801\udc01\ud802\udc02
1087 *\ud801\udc01\ud802\udc02
1088 true *\ud801\udc01\ud802\udc02 0
1089 
1090 \ud802\udc02l\ud801\udc01h\Q***\ud801\udc01\ud802\udc02\ud800\udc03
1091 \ud802\udc02l\ud801\udc01h***\ud801\udc01\ud802\udc02\ud800\udc03
1092 true \ud802\udc02l\ud801\udc01h***\ud801\udc01\ud802\udc02\ud800\udc03 0
1093 
1094 \ud802\udc02l\ud801\udc01\Q***\ud801\udc01\ud802\udc02\ud800\udc03
1095 \ud802\udc02l\ud801\udc01***\ud801\udc01\ud802\udc02\ud800\udc03
1096 true \ud802\udc02l\ud801\udc01***\ud801\udc01\ud802\udc02\ud800\udc03 0
1097 
1098 //Test cases below copied from i18n QE's RegexSupplementaryTests.txt
1099 \uD800\uDFFF\uD801\uDFF1\uDB00\uDC00
1100 \uD800\uDFFF\uD801\uDFF1\uDB00\uDC00
1101 true \uD800\uDFFF\uD801\uDFF1\uDB00\uDC00 0
1102 
1103 \uD800\uDFFF\uD801\uDFF1\uDB00\uDC00
1104 \u1000\uD801\uDFF1\uDB00\uDC00
1105 false 0
1106 
1107 \uD800\uDFFF\uD801\uDFF1\uDB00\uDC00
1108 \uD800\uDFFF\uFFFF\uDB00\uDC00
1109 false 0
1110 
1111 \uD800\uDFFF\uD801\uDFF1\uDB00\uDC00
1112 \uD800\uDFFF\uD801\uDFF1\uFFFF
1113 false 0
1114 
1115 \u1000.\uFFFF
1116 \u1000\uD800\uDFFF\uFFFF
1117 true \u1000\uD800\uDFFF\uFFFF 0
1118 
1119 //=======
1120 // Ranges
1121 //=======
1122 [a-\uD800\uDFFF]
1123 \uDFFF
1124 true \uDFFF 0
1125 
1126 [a-\uD800\uDFFF]
1127 \uD800
1128 true \uD800 0
1129 
1130 [a-\uD800\uDFFF]
1131 \uD800\uDFFF
1132 true \uD800\uDFFF 0
1133 
1134 [\uD800\uDC00-\uDBFF\uDFFF]
1135 \uDBFF
1136 false 0
1137 
1138 [\uD800\uDC00-\uDBFF\uDFFF]
1139 \uDC00
1140 false 0
1141 
1142 [\uD800-\uDFFF]
1143 \uD800\uDFFF
1144 false 0
1145 
1146 [\uD800-\uDFFF]
1147 \uDFFF\uD800
1148 true \uDFFF 0
1149 
1150 foo[^\uD800-\uDFFF]
1151 foo\uD800\uDFFF
1152 true foo\uD800\uDFFF 0
1153 
1154 foo[^\uD800-\uDFFF]
1155 foo\uDFFF\uD800
1156 false 0
1157 
1158 //fo\uD800[\uDC00-\uDFFF]
1159 
1160 //==================
1161 // Character Classes
1162 //==================
1163 // Simple class
1164 [ab\uD800\uDFFFcd]at
1165 \uD800at
1166 false 0
1167 
1168 [ab\uD800\uDFFFcd]at
1169 \uD800\uDFFFat
1170 true \uD800\uDFFFat 0
1171 
1172 // Negation
1173 [^\uD800\uDFFFcd]at
1174 \uD800at
1175 true \uD800at 0
1176 
1177 [^\uD800\uDFFFcd]at
1178 \uDFFFat
1179 true \uDFFFat 0
1180 
1181 // Inclusive range
1182 [\u0000-\uD800\uDFFF-\uFFFF]
1183 \uD800\uDFFF
1184 true \uD800\uDFFF 0
1185 
1186 // Unions
1187 [\u0000-\uD800[\uDFFF-\uFFFF]]
1188 \uD800\uDFFF
1189 false 0
1190 
1191 
1192 // Intersection
1193 [\u0000-\uFFFF&&[\uD800\uDFFF]]
1194 \uD800\uDFFF
1195 false 0
1196 
1197 [\u0000-\uFFFF&&[\uD800\uDFFF]]
1198 \uD800
1199 false 0
1200 
1201 [\u0000-\uFFFF&&[\uDFFF\uD800]]
1202 \uD800
1203 true \uD800 0
1204 
1205 [\u0000-\uFFFF&&[\uDFFF\uD800\uDC00]]
1206 \uDC00
1207 false 0
1208 
1209 [\u0000-\uDFFF&&[\uD800-\uFFFF]]
1210 \uD800\uDFFF
1211 false 0
1212 
1213 [\u0000-\uDFFF&&[\uD800-\uFFFF]]
1214 \uDFFF\uD800
1215 true \uDFFF 0
1216 
1217 // Subtraction
1218 [\u0000-\uD800\uDFFF&&[^\uD800\uDC00]]
1219 \uD800
1220 true \uD800 0
1221 
1222 [\u0000-\uD800\uDFFF&&[^\uD800\uDC00]]
1223 \uDC00
1224 true \uDC00 0
1225 
1226 [\u0000-\uD800\uDFFF&&[^\uD800\uDC00]]
1227 \uD800\uDFFF
1228 true \uD800\uDFFF 0
1229 
1230 [\u0000-\uD800\uDFFF&&[^\uD800\uDBFF\uDC00]]
1231 \uD800
1232 false 0
1233 
1234 [\u0000-\uD800\uDFFF&&[^\uDC00\uD800\uDBFF]]
1235 \uD800\uDC00
1236 true \uD800\uDC00 0
1237 
1238 // Quantifiers
1239 a\uD800\uDFFF?
1240 a\uD800
1241 true a 0
1242 
1243 a\uD800\uDFFF?
1244 a\uDFFF
1245 true a 0
1246 
1247 a\uD800\uDFFF?
1248 a\uD800\uDFFF
1249 true a\uD800\uDFFF 0
1250 
1251 a\uDFFF\uD800?
1252 a\uDFFF
1253 true a\uDFFF 0
1254 
1255 a\uDFFF\uD800?
1256 a\uD800
1257 false 0
1258 
1259 \uD800\uDFFF\uDC00?
1260 \uD800
1261 false 0
1262 
1263 \uD800\uDFFF\uDC00?
1264 \uD800\uDFFF
1265 true \uD800\uDFFF 0
1266 
1267 a\uD800\uDFFF??
1268 a\uDFFF
1269 true a 0
1270 
1271 a\uD800\uDFFF*
1272 a
1273 true a 0
1274 
1275 a\uD800\uDFFF*
1276 a\uD800
1277 true a 0
1278 
1279 \uD800\uDFFF*
1280 \uD800\uDFFF\uD800\uDFFF\uD800\uDFFF\uD800\uDFFF
1281 true \uD800\uDFFF\uD800\uDFFF\uD800\uDFFF\uD800\uDFFF 0
1282 
1283 \uD800\uDFFF*
1284 \uD800\uDFFF\uDFFF\uDFFF\uDFFF
1285 true \uD800\uDFFF 0
1286 
1287 \uD800*\uDFFF
1288 \uD800\uDFFF
1289 false 0
1290 
1291 a\uD800\uDFFF*
1292 a\uD800
1293 true a 0
1294 
1295 \uDFFF\uD800*
1296 \uDFFF
1297 true \uDFFF 0
1298 
1299 \uDFFF\uD800*
1300 \uDFFF\uD800\uD800\uD800
1301 true \uDFFF\uD800\uD800\uD800 0
1302 
1303 \uD800\uDFFF+
1304 \uD800\uDFFF\uDFFF\uDFFF
1305 true \uD800\uDFFF 0
1306 
1307 \uD800\uDFFF+
1308 \uD800
1309 false 0
1310 
1311 \uD800\uDFFF+
1312 \uD800\uDFFF
1313 true \uD800\uDFFF 0
1314 
1315 \uD800\uDFFF+
1316 \uD800\uDFFF\uD800\uDFFF\uD800\uDFFF
1317 true \uD800\uDFFF\uD800\uDFFF\uD800\uDFFF 0
1318 
1319 \uDFFF\uD800+
1320 \uDFFF\uD800\uDFFF\uD800
1321 false 0
1322 
1323 \uD800+\uDFFF
1324 \uD800\uDFFF
1325 false 0
1326 
1327 \uD800+\uDFFF
1328 \uD800
1329 false 0
1330 
1331 \uDFFF+\uD800
1332 \uD800
1333 false 0
1334 
1335 \uDFFF+\uD800
1336 \uDFFF\uD800
1337 true \uDFFF\uD800 0
1338 
1339 \uD800\uDFFF{3}
1340 \uD800\uDFFF\uDFFF\uDFFF
1341 false 0
1342 
1343 \uD800\uDFFF{3}
1344 \uD800\uDFFF\uD800\uDFFF\uD800\uDFFF
1345 true \uD800\uDFFF\uD800\uDFFF\uD800\uDFFF 0
1346 
1347 \uDFFF\uD800{3}
1348 \uDFFF\uD800\uDFFF\uD800\uDFFF\uD800
1349 false 0
1350 
1351 \uDFFF\uD800{3}
1352 \uDFFF\uD800\uD800\uD800
1353 true \uDFFF\uD800\uD800\uD800 0
1354 
1355 \uD800\uDFFF{2,}
1356 \uD800\uDFFF
1357 false 0
1358 
1359 \uD800\uDFFF{2,}
1360 \uD800\uDFFF\uDFFF
1361 false 0
1362 
1363 \uD800\uDFFF{2,}
1364 \uD800\uDFFF\uD800\uDFFF
1365 true \uD800\uDFFF\uD800\uDFFF 0
1366 
1367 \uDFFF\uD800{2,}
1368 \uDFFF\uD800\uDFFF\uD800
1369 false 0
1370 
1371 \uDFFF\uD800{2,}
1372 \uDFFF\uD800\uD800\uD800
1373 true \uDFFF\uD800\uD800\uD800 0
1374 
1375 \uD800\uDFFF{3,4}
1376 \uD800\uDFFF\uD800\uDFFF\uD800\uDFFF\uD800\uDFFF
1377 true \uD800\uDFFF\uD800\uDFFF\uD800\uDFFF\uD800\uDFFF 0
1378 
1379 \uD800\uDFFF{3,4}
1380 \uD800\uDFFF\uD800\uDFFF\uD800\uDFFF\uD800
1381 true \uD800\uDFFF\uD800\uDFFF\uD800\uDFFF 0
1382 
1383 \uD800\uDFFF{3,4}
1384 \uD800\uDFFF\uD800\uD800\uDFFF\uD800\uDFFF
1385 false 0
1386 
1387 \uDFFF\uD800{3,5}
1388 \uDFFF\uD800\uD800\uD800\uD800\uD800\uD800\uD800
1389 true \uDFFF\uD800\uD800\uD800\uD800\uD800 0
1390 
1391 \uD800\uDFFF{3,5}
1392 \uD800\uDFFF\uDFFF\uDFFF
1393 false 0
1394 
1395 \uD800\uDFFF{3,5}
1396 \uD800\uDFFF\uD800\uD800\uDFFF\uD800\uDFFF\uD800\uDFFF
1397 true \uD800\uDFFF\uD800\uDFFF\uD800\uDFFF 0
1398 
1399 // Groupings
1400 (\uD800(\uDFFF))
1401 \uD800\uDFFF
1402 false 2
1403 
1404 (\uD800(\uDC00)(\uDFFF))
1405 \uD800\uDC00\uDFFF
1406 false 3
1407 
1408 ((\uD800)(\uDFFF))
1409 \uD800\uDFFF
1410 false 3
1411 
1412 (\uD800(\uDFFF)\uDFFF)
1413 \uD800\uDFFF
1414 false 2
1415 
1416 (\uDFFF(\uD800)(\uDBFF))
1417 \uDFFF\uD800\uDBFF
1418 true \uDFFF\uD800\uDBFF 3 \uDFFF\uD800\uDBFF \uD800 \uDBFF
1419 
1420 (\uDFFF(\uD800)(\uDC00))
1421 \uDFFF\uD800\uDC00
1422 false 3
1423 
1424 (\uDFFF\uD800(\uDC00\uDBFF))
1425 \uDFFF\uD800\uDC00\uDBFF
1426 false 2
1427 
1428 (\uD800\uDFFF(\uDBFF)(\uDC00))
1429 \uD800\uDFFF\uDBFF\uDC00
1430 false 3
1431 
1432 (\uD800\uDFFF(\uDBFF\uDC00))
1433 \uD800\uDFFF\uDBFF\uDC00
1434 true \uD800\uDFFF\uDBFF\uDC00 2 \uD800\uDFFF\uDBFF\uDC00 \uDBFF\uDC00