/vendor/pcre/testdata/testoutput7

http://github.com/feyeleanor/RubyGoLightly · #! · 7257 lines · 6464 code · 793 blank · 0 comment · 0 complexity · 9c72a53ebadbc73f1eff5e8466fcef62 MD5 · raw file

  1. /abc/
  2. abc
  3. 0: abc
  4. /ab*c/
  5. abc
  6. 0: abc
  7. abbbbc
  8. 0: abbbbc
  9. ac
  10. 0: ac
  11. /ab+c/
  12. abc
  13. 0: abc
  14. abbbbbbc
  15. 0: abbbbbbc
  16. *** Failers
  17. No match
  18. ac
  19. No match
  20. ab
  21. No match
  22. /a*/
  23. a
  24. 0: a
  25. 1:
  26. aaaaaaaaaaaaaaaaa
  27. 0: aaaaaaaaaaaaaaaaa
  28. 1: aaaaaaaaaaaaaaaa
  29. 2: aaaaaaaaaaaaaaa
  30. 3: aaaaaaaaaaaaaa
  31. 4: aaaaaaaaaaaaa
  32. 5: aaaaaaaaaaaa
  33. 6: aaaaaaaaaaa
  34. 7: aaaaaaaaaa
  35. 8: aaaaaaaaa
  36. 9: aaaaaaaa
  37. 10: aaaaaaa
  38. 11: aaaaaa
  39. 12: aaaaa
  40. 13: aaaa
  41. 14: aaa
  42. 15: aa
  43. 16: a
  44. 17:
  45. aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  46. Matched, but too many subsidiary matches
  47. 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  48. 1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  49. 2: aaaaaaaaaaaaaaaaaaaaaaaaaaaa
  50. 3: aaaaaaaaaaaaaaaaaaaaaaaaaaa
  51. 4: aaaaaaaaaaaaaaaaaaaaaaaaaa
  52. 5: aaaaaaaaaaaaaaaaaaaaaaaaa
  53. 6: aaaaaaaaaaaaaaaaaaaaaaaa
  54. 7: aaaaaaaaaaaaaaaaaaaaaaa
  55. 8: aaaaaaaaaaaaaaaaaaaaaa
  56. 9: aaaaaaaaaaaaaaaaaaaaa
  57. 10: aaaaaaaaaaaaaaaaaaaa
  58. 11: aaaaaaaaaaaaaaaaaaa
  59. 12: aaaaaaaaaaaaaaaaaa
  60. 13: aaaaaaaaaaaaaaaaa
  61. 14: aaaaaaaaaaaaaaaa
  62. 15: aaaaaaaaaaaaaaa
  63. 16: aaaaaaaaaaaaaa
  64. 17: aaaaaaaaaaaaa
  65. 18: aaaaaaaaaaaa
  66. 19: aaaaaaaaaaa
  67. 20: aaaaaaaaaa
  68. 21: aaaaaaaaa
  69. aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\F
  70. 0:
  71. /(a|abcd|african)/
  72. a
  73. 0: a
  74. abcd
  75. 0: abcd
  76. 1: a
  77. african
  78. 0: african
  79. 1: a
  80. /^abc/
  81. abcdef
  82. 0: abc
  83. *** Failers
  84. No match
  85. xyzabc
  86. No match
  87. xyz\nabc
  88. No match
  89. /^abc/m
  90. abcdef
  91. 0: abc
  92. xyz\nabc
  93. 0: abc
  94. *** Failers
  95. No match
  96. xyzabc
  97. No match
  98. /\Aabc/
  99. abcdef
  100. 0: abc
  101. *** Failers
  102. No match
  103. xyzabc
  104. No match
  105. xyz\nabc
  106. No match
  107. /\Aabc/m
  108. abcdef
  109. 0: abc
  110. *** Failers
  111. No match
  112. xyzabc
  113. No match
  114. xyz\nabc
  115. No match
  116. /\Gabc/
  117. abcdef
  118. 0: abc
  119. xyzabc\>3
  120. 0: abc
  121. *** Failers
  122. No match
  123. xyzabc
  124. No match
  125. xyzabc\>2
  126. No match
  127. /x\dy\Dz/
  128. x9yzz
  129. 0: x9yzz
  130. x0y+z
  131. 0: x0y+z
  132. *** Failers
  133. No match
  134. xyz
  135. No match
  136. xxy0z
  137. No match
  138. /x\sy\Sz/
  139. x yzz
  140. 0: x yzz
  141. x y+z
  142. 0: x y+z
  143. *** Failers
  144. No match
  145. xyz
  146. No match
  147. xxyyz
  148. No match
  149. /x\wy\Wz/
  150. xxy+z
  151. 0: xxy+z
  152. *** Failers
  153. No match
  154. xxy0z
  155. No match
  156. x+y+z
  157. No match
  158. /x.y/
  159. x+y
  160. 0: x+y
  161. x-y
  162. 0: x-y
  163. *** Failers
  164. No match
  165. x\ny
  166. No match
  167. /x.y/s
  168. x+y
  169. 0: x+y
  170. x-y
  171. 0: x-y
  172. x\ny
  173. 0: x\x0ay
  174. /(a.b(?s)c.d|x.y)p.q/
  175. a+bc+dp+q
  176. 0: a+bc+dp+q
  177. a+bc\ndp+q
  178. 0: a+bc\x0adp+q
  179. x\nyp+q
  180. 0: x\x0ayp+q
  181. *** Failers
  182. No match
  183. a\nbc\ndp+q
  184. No match
  185. a+bc\ndp\nq
  186. No match
  187. x\nyp\nq
  188. No match
  189. /a\d\z/
  190. ba0
  191. 0: a0
  192. *** Failers
  193. No match
  194. ba0\n
  195. No match
  196. ba0\ncd
  197. No match
  198. /a\d\z/m
  199. ba0
  200. 0: a0
  201. *** Failers
  202. No match
  203. ba0\n
  204. No match
  205. ba0\ncd
  206. No match
  207. /a\d\Z/
  208. ba0
  209. 0: a0
  210. ba0\n
  211. 0: a0
  212. *** Failers
  213. No match
  214. ba0\ncd
  215. No match
  216. /a\d\Z/m
  217. ba0
  218. 0: a0
  219. ba0\n
  220. 0: a0
  221. *** Failers
  222. No match
  223. ba0\ncd
  224. No match
  225. /a\d$/
  226. ba0
  227. 0: a0
  228. ba0\n
  229. 0: a0
  230. *** Failers
  231. No match
  232. ba0\ncd
  233. No match
  234. /a\d$/m
  235. ba0
  236. 0: a0
  237. ba0\n
  238. 0: a0
  239. ba0\ncd
  240. 0: a0
  241. *** Failers
  242. No match
  243. /abc/i
  244. abc
  245. 0: abc
  246. aBc
  247. 0: aBc
  248. ABC
  249. 0: ABC
  250. /[^a]/
  251. abcd
  252. 0: b
  253. /ab?\w/
  254. abz
  255. 0: abz
  256. 1: ab
  257. abbz
  258. 0: abb
  259. 1: ab
  260. azz
  261. 0: az
  262. /x{0,3}yz/
  263. ayzq
  264. 0: yz
  265. axyzq
  266. 0: xyz
  267. axxyz
  268. 0: xxyz
  269. axxxyzq
  270. 0: xxxyz
  271. axxxxyzq
  272. 0: xxxyz
  273. *** Failers
  274. No match
  275. ax
  276. No match
  277. axx
  278. No match
  279. /x{3}yz/
  280. axxxyzq
  281. 0: xxxyz
  282. axxxxyzq
  283. 0: xxxyz
  284. *** Failers
  285. No match
  286. ax
  287. No match
  288. axx
  289. No match
  290. ayzq
  291. No match
  292. axyzq
  293. No match
  294. axxyz
  295. No match
  296. /x{2,3}yz/
  297. axxyz
  298. 0: xxyz
  299. axxxyzq
  300. 0: xxxyz
  301. axxxxyzq
  302. 0: xxxyz
  303. *** Failers
  304. No match
  305. ax
  306. No match
  307. axx
  308. No match
  309. ayzq
  310. No match
  311. axyzq
  312. No match
  313. /[^a]+/
  314. bac
  315. 0: b
  316. bcdefax
  317. 0: bcdef
  318. 1: bcde
  319. 2: bcd
  320. 3: bc
  321. 4: b
  322. *** Failers
  323. 0: *** F
  324. 1: ***
  325. 2: ***
  326. 3: **
  327. 4: *
  328. aaaaa
  329. No match
  330. /[^a]*/
  331. bac
  332. 0: b
  333. 1:
  334. bcdefax
  335. 0: bcdef
  336. 1: bcde
  337. 2: bcd
  338. 3: bc
  339. 4: b
  340. 5:
  341. *** Failers
  342. 0: *** F
  343. 1: ***
  344. 2: ***
  345. 3: **
  346. 4: *
  347. 5:
  348. aaaaa
  349. 0:
  350. /[^a]{3,5}/
  351. xyz
  352. 0: xyz
  353. awxyza
  354. 0: wxyz
  355. 1: wxy
  356. abcdefa
  357. 0: bcdef
  358. 1: bcde
  359. 2: bcd
  360. abcdefghijk
  361. 0: bcdef
  362. 1: bcde
  363. 2: bcd
  364. *** Failers
  365. 0: *** F
  366. 1: ***
  367. 2: ***
  368. axya
  369. No match
  370. axa
  371. No match
  372. aaaaa
  373. No match
  374. /\d*/
  375. 1234b567
  376. 0: 1234
  377. 1: 123
  378. 2: 12
  379. 3: 1
  380. 4:
  381. xyz
  382. 0:
  383. /\D*/
  384. a1234b567
  385. 0: a
  386. 1:
  387. xyz
  388. 0: xyz
  389. 1: xy
  390. 2: x
  391. 3:
  392. /\d+/
  393. ab1234c56
  394. 0: 1234
  395. 1: 123
  396. 2: 12
  397. 3: 1
  398. *** Failers
  399. No match
  400. xyz
  401. No match
  402. /\D+/
  403. ab123c56
  404. 0: ab
  405. 1: a
  406. *** Failers
  407. 0: *** Failers
  408. 1: *** Failer
  409. 2: *** Faile
  410. 3: *** Fail
  411. 4: *** Fai
  412. 5: *** Fa
  413. 6: *** F
  414. 7: ***
  415. 8: ***
  416. 9: **
  417. 10: *
  418. 789
  419. No match
  420. /\d?A/
  421. 045ABC
  422. 0: 5A
  423. ABC
  424. 0: A
  425. *** Failers
  426. No match
  427. XYZ
  428. No match
  429. /\D?A/
  430. ABC
  431. 0: A
  432. BAC
  433. 0: BA
  434. 9ABC
  435. 0: A
  436. *** Failers
  437. No match
  438. /a+/
  439. aaaa
  440. 0: aaaa
  441. 1: aaa
  442. 2: aa
  443. 3: a
  444. /^.*xyz/
  445. xyz
  446. 0: xyz
  447. ggggggggxyz
  448. 0: ggggggggxyz
  449. /^.+xyz/
  450. abcdxyz
  451. 0: abcdxyz
  452. axyz
  453. 0: axyz
  454. *** Failers
  455. No match
  456. xyz
  457. No match
  458. /^.?xyz/
  459. xyz
  460. 0: xyz
  461. cxyz
  462. 0: cxyz
  463. /^\d{2,3}X/
  464. 12X
  465. 0: 12X
  466. 123X
  467. 0: 123X
  468. *** Failers
  469. No match
  470. X
  471. No match
  472. 1X
  473. No match
  474. 1234X
  475. No match
  476. /^[abcd]\d/
  477. a45
  478. 0: a4
  479. b93
  480. 0: b9
  481. c99z
  482. 0: c9
  483. d04
  484. 0: d0
  485. *** Failers
  486. No match
  487. e45
  488. No match
  489. abcd
  490. No match
  491. abcd1234
  492. No match
  493. 1234
  494. No match
  495. /^[abcd]*\d/
  496. a45
  497. 0: a4
  498. b93
  499. 0: b9
  500. c99z
  501. 0: c9
  502. d04
  503. 0: d0
  504. abcd1234
  505. 0: abcd1
  506. 1234
  507. 0: 1
  508. *** Failers
  509. No match
  510. e45
  511. No match
  512. abcd
  513. No match
  514. /^[abcd]+\d/
  515. a45
  516. 0: a4
  517. b93
  518. 0: b9
  519. c99z
  520. 0: c9
  521. d04
  522. 0: d0
  523. abcd1234
  524. 0: abcd1
  525. *** Failers
  526. No match
  527. 1234
  528. No match
  529. e45
  530. No match
  531. abcd
  532. No match
  533. /^a+X/
  534. aX
  535. 0: aX
  536. aaX
  537. 0: aaX
  538. /^[abcd]?\d/
  539. a45
  540. 0: a4
  541. b93
  542. 0: b9
  543. c99z
  544. 0: c9
  545. d04
  546. 0: d0
  547. 1234
  548. 0: 1
  549. *** Failers
  550. No match
  551. abcd1234
  552. No match
  553. e45
  554. No match
  555. /^[abcd]{2,3}\d/
  556. ab45
  557. 0: ab4
  558. bcd93
  559. 0: bcd9
  560. *** Failers
  561. No match
  562. 1234
  563. No match
  564. a36
  565. No match
  566. abcd1234
  567. No match
  568. ee45
  569. No match
  570. /^(abc)*\d/
  571. abc45
  572. 0: abc4
  573. abcabcabc45
  574. 0: abcabcabc4
  575. 42xyz
  576. 0: 4
  577. *** Failers
  578. No match
  579. /^(abc)+\d/
  580. abc45
  581. 0: abc4
  582. abcabcabc45
  583. 0: abcabcabc4
  584. *** Failers
  585. No match
  586. 42xyz
  587. No match
  588. /^(abc)?\d/
  589. abc45
  590. 0: abc4
  591. 42xyz
  592. 0: 4
  593. *** Failers
  594. No match
  595. abcabcabc45
  596. No match
  597. /^(abc){2,3}\d/
  598. abcabc45
  599. 0: abcabc4
  600. abcabcabc45
  601. 0: abcabcabc4
  602. *** Failers
  603. No match
  604. abcabcabcabc45
  605. No match
  606. abc45
  607. No match
  608. 42xyz
  609. No match
  610. /1(abc|xyz)2(?1)3/
  611. 1abc2abc3456
  612. 0: 1abc2abc3
  613. 1abc2xyz3456
  614. 0: 1abc2xyz3
  615. /^(a*\w|ab)=(a*\w|ab)/
  616. ab=ab
  617. 0: ab=ab
  618. 1: ab=a
  619. /^(a*\w|ab)=(?1)/
  620. ab=ab
  621. 0: ab=ab
  622. /^([^()]|\((?1)*\))*$/
  623. abc
  624. 0: abc
  625. a(b)c
  626. 0: a(b)c
  627. a(b(c))d
  628. 0: a(b(c))d
  629. *** Failers)
  630. No match
  631. a(b(c)d
  632. No match
  633. /^>abc>([^()]|\((?1)*\))*<xyz<$/
  634. >abc>123<xyz<
  635. 0: >abc>123<xyz<
  636. >abc>1(2)3<xyz<
  637. 0: >abc>1(2)3<xyz<
  638. >abc>(1(2)3)<xyz<
  639. 0: >abc>(1(2)3)<xyz<
  640. /^(?>a*)\d/
  641. aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa9876
  642. 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa9
  643. *** Failers
  644. No match
  645. aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  646. No match
  647. /< (?: (?(R) \d++ | [^<>]*+) | (?R)) * >/x
  648. <>
  649. 0: <>
  650. <abcd>
  651. 0: <abcd>
  652. <abc <123> hij>
  653. 0: <abc <123> hij>
  654. <abc <def> hij>
  655. 0: <def>
  656. <abc<>def>
  657. 0: <abc<>def>
  658. <abc<>
  659. 0: <>
  660. *** Failers
  661. No match
  662. <abc
  663. No match
  664. /^(?(?=abc)\w{3}:|\d\d)$/
  665. abc:
  666. 0: abc:
  667. 12
  668. 0: 12
  669. *** Failers
  670. No match
  671. 123
  672. No match
  673. xyz
  674. No match
  675. /^(?(?!abc)\d\d|\w{3}:)$/
  676. abc:
  677. 0: abc:
  678. 12
  679. 0: 12
  680. *** Failers
  681. No match
  682. 123
  683. No match
  684. xyz
  685. No match
  686. /^(?=abc)\w{5}:$/
  687. abcde:
  688. 0: abcde:
  689. *** Failers
  690. No match
  691. abc..
  692. No match
  693. 123
  694. No match
  695. vwxyz
  696. No match
  697. /^(?!abc)\d\d$/
  698. 12
  699. 0: 12
  700. *** Failers
  701. No match
  702. abcde:
  703. No match
  704. abc..
  705. No match
  706. 123
  707. No match
  708. vwxyz
  709. No match
  710. /(?<=abc|xy)123/
  711. abc12345
  712. 0: 123
  713. wxy123z
  714. 0: 123
  715. *** Failers
  716. No match
  717. 123abc
  718. No match
  719. /(?<!abc|xy)123/
  720. 123abc
  721. 0: 123
  722. mno123456
  723. 0: 123
  724. *** Failers
  725. No match
  726. abc12345
  727. No match
  728. wxy123z
  729. No match
  730. /abc(?C1)xyz/
  731. abcxyz
  732. --->abcxyz
  733. 1 ^ ^ x
  734. 0: abcxyz
  735. 123abcxyz999
  736. --->123abcxyz999
  737. 1 ^ ^ x
  738. 0: abcxyz
  739. /(ab|cd){3,4}/C
  740. ababab
  741. --->ababab
  742. +0 ^ (ab|cd){3,4}
  743. +1 ^ a
  744. +4 ^ c
  745. +2 ^^ b
  746. +3 ^ ^ |
  747. +1 ^ ^ a
  748. +4 ^ ^ c
  749. +2 ^ ^ b
  750. +3 ^ ^ |
  751. +1 ^ ^ a
  752. +4 ^ ^ c
  753. +2 ^ ^ b
  754. +3 ^ ^ |
  755. +12 ^ ^
  756. +1 ^ ^ a
  757. +4 ^ ^ c
  758. 0: ababab
  759. abcdabcd
  760. --->abcdabcd
  761. +0 ^ (ab|cd){3,4}
  762. +1 ^ a
  763. +4 ^ c
  764. +2 ^^ b
  765. +3 ^ ^ |
  766. +1 ^ ^ a
  767. +4 ^ ^ c
  768. +5 ^ ^ d
  769. +6 ^ ^ )
  770. +1 ^ ^ a
  771. +4 ^ ^ c
  772. +2 ^ ^ b
  773. +3 ^ ^ |
  774. +12 ^ ^
  775. +1 ^ ^ a
  776. +4 ^ ^ c
  777. +5 ^ ^ d
  778. +6 ^ ^ )
  779. +12 ^ ^
  780. 0: abcdabcd
  781. 1: abcdab
  782. abcdcdcdcdcd
  783. --->abcdcdcdcdcd
  784. +0 ^ (ab|cd){3,4}
  785. +1 ^ a
  786. +4 ^ c
  787. +2 ^^ b
  788. +3 ^ ^ |
  789. +1 ^ ^ a
  790. +4 ^ ^ c
  791. +5 ^ ^ d
  792. +6 ^ ^ )
  793. +1 ^ ^ a
  794. +4 ^ ^ c
  795. +5 ^ ^ d
  796. +6 ^ ^ )
  797. +12 ^ ^
  798. +1 ^ ^ a
  799. +4 ^ ^ c
  800. +5 ^ ^ d
  801. +6 ^ ^ )
  802. +12 ^ ^
  803. 0: abcdcdcd
  804. 1: abcdcd
  805. /^abc/
  806. abcdef
  807. 0: abc
  808. *** Failers
  809. No match
  810. abcdef\B
  811. No match
  812. /^(a*|xyz)/
  813. bcd
  814. 0:
  815. aaabcd
  816. 0: aaa
  817. 1: aa
  818. 2: a
  819. 3:
  820. xyz
  821. 0: xyz
  822. 1:
  823. xyz\N
  824. 0: xyz
  825. *** Failers
  826. 0:
  827. bcd\N
  828. No match
  829. /xyz$/
  830. xyz
  831. 0: xyz
  832. xyz\n
  833. 0: xyz
  834. *** Failers
  835. No match
  836. xyz\Z
  837. No match
  838. xyz\n\Z
  839. No match
  840. /xyz$/m
  841. xyz
  842. 0: xyz
  843. xyz\n
  844. 0: xyz
  845. abcxyz\npqr
  846. 0: xyz
  847. abcxyz\npqr\Z
  848. 0: xyz
  849. xyz\n\Z
  850. 0: xyz
  851. *** Failers
  852. No match
  853. xyz\Z
  854. No match
  855. /\Gabc/
  856. abcdef
  857. 0: abc
  858. defabcxyz\>3
  859. 0: abc
  860. *** Failers
  861. No match
  862. defabcxyz
  863. No match
  864. /^abcdef/
  865. ab\P
  866. Partial match: ab
  867. abcde\P
  868. Partial match: abcde
  869. abcdef\P
  870. 0: abcdef
  871. *** Failers
  872. No match
  873. abx\P
  874. No match
  875. /^a{2,4}\d+z/
  876. a\P
  877. Partial match: a
  878. aa\P
  879. Partial match: aa
  880. aa2\P
  881. Partial match: aa2
  882. aaa\P
  883. Partial match: aaa
  884. aaa23\P
  885. Partial match: aaa23
  886. aaaa12345\P
  887. Partial match: aaaa12345
  888. aa0z\P
  889. 0: aa0z
  890. aaaa4444444444444z\P
  891. 0: aaaa4444444444444z
  892. *** Failers
  893. No match
  894. az\P
  895. No match
  896. aaaaa\P
  897. No match
  898. a56\P
  899. No match
  900. /^abcdef/
  901. abc\P
  902. Partial match: abc
  903. def\R
  904. 0: def
  905. /(?<=foo)bar/
  906. xyzfo\P
  907. No match
  908. foob\P\>2
  909. Partial match: b
  910. foobar...\R\P\>4
  911. 0: ar
  912. xyzfo\P
  913. No match
  914. foobar\>2
  915. 0: bar
  916. *** Failers
  917. No match
  918. xyzfo\P
  919. No match
  920. obar\R
  921. No match
  922. /(ab*(cd|ef))+X/
  923. adfadadaklhlkalkajhlkjahdfasdfasdfladsfjkj\P\Z
  924. No match
  925. lkjhlkjhlkjhlkjhabbbbbbcdaefabbbbbbbefa\P\B\Z
  926. Partial match: abbbbbbcdaefabbbbbbbefa
  927. cdabbbbbbbb\P\R\B\Z
  928. Partial match: cdabbbbbbbb
  929. efabbbbbbbbbbbbbbbb\P\R\B\Z
  930. Partial match: efabbbbbbbbbbbbbbbb
  931. bbbbbbbbbbbbcdXyasdfadf\P\R\B\Z
  932. 0: bbbbbbbbbbbbcdX
  933. /(a|b)/SF>testsavedregex
  934. Compiled regex written to testsavedregex
  935. Study data written to testsavedregex
  936. <testsavedregex
  937. Compiled regex (byte-inverted) loaded from testsavedregex
  938. Study data loaded from testsavedregex
  939. abc
  940. 0: a
  941. ** Failers
  942. 0: a
  943. def
  944. No match
  945. /the quick brown fox/
  946. the quick brown fox
  947. 0: the quick brown fox
  948. The quick brown FOX
  949. No match
  950. What do you know about the quick brown fox?
  951. 0: the quick brown fox
  952. What do you know about THE QUICK BROWN FOX?
  953. No match
  954. /The quick brown fox/i
  955. the quick brown fox
  956. 0: the quick brown fox
  957. The quick brown FOX
  958. 0: The quick brown FOX
  959. What do you know about the quick brown fox?
  960. 0: the quick brown fox
  961. What do you know about THE QUICK BROWN FOX?
  962. 0: THE QUICK BROWN FOX
  963. /abcd\t\n\r\f\a\e\071\x3b\$\\\?caxyz/
  964. abcd\t\n\r\f\a\e9;\$\\?caxyz
  965. 0: abcd\x09\x0a\x0d\x0c\x07\x1b9;$\?caxyz
  966. /a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz/
  967. abxyzpqrrrabbxyyyypqAzz
  968. 0: abxyzpqrrrabbxyyyypqAzz
  969. abxyzpqrrrabbxyyyypqAzz
  970. 0: abxyzpqrrrabbxyyyypqAzz
  971. aabxyzpqrrrabbxyyyypqAzz
  972. 0: aabxyzpqrrrabbxyyyypqAzz
  973. aaabxyzpqrrrabbxyyyypqAzz
  974. 0: aaabxyzpqrrrabbxyyyypqAzz
  975. aaaabxyzpqrrrabbxyyyypqAzz
  976. 0: aaaabxyzpqrrrabbxyyyypqAzz
  977. abcxyzpqrrrabbxyyyypqAzz
  978. 0: abcxyzpqrrrabbxyyyypqAzz
  979. aabcxyzpqrrrabbxyyyypqAzz
  980. 0: aabcxyzpqrrrabbxyyyypqAzz
  981. aaabcxyzpqrrrabbxyyyypAzz
  982. 0: aaabcxyzpqrrrabbxyyyypAzz
  983. aaabcxyzpqrrrabbxyyyypqAzz
  984. 0: aaabcxyzpqrrrabbxyyyypqAzz
  985. aaabcxyzpqrrrabbxyyyypqqAzz
  986. 0: aaabcxyzpqrrrabbxyyyypqqAzz
  987. aaabcxyzpqrrrabbxyyyypqqqAzz
  988. 0: aaabcxyzpqrrrabbxyyyypqqqAzz
  989. aaabcxyzpqrrrabbxyyyypqqqqAzz
  990. 0: aaabcxyzpqrrrabbxyyyypqqqqAzz
  991. aaabcxyzpqrrrabbxyyyypqqqqqAzz
  992. 0: aaabcxyzpqrrrabbxyyyypqqqqqAzz
  993. aaabcxyzpqrrrabbxyyyypqqqqqqAzz
  994. 0: aaabcxyzpqrrrabbxyyyypqqqqqqAzz
  995. aaaabcxyzpqrrrabbxyyyypqAzz
  996. 0: aaaabcxyzpqrrrabbxyyyypqAzz
  997. abxyzzpqrrrabbxyyyypqAzz
  998. 0: abxyzzpqrrrabbxyyyypqAzz
  999. aabxyzzzpqrrrabbxyyyypqAzz
  1000. 0: aabxyzzzpqrrrabbxyyyypqAzz
  1001. aaabxyzzzzpqrrrabbxyyyypqAzz
  1002. 0: aaabxyzzzzpqrrrabbxyyyypqAzz
  1003. aaaabxyzzzzpqrrrabbxyyyypqAzz
  1004. 0: aaaabxyzzzzpqrrrabbxyyyypqAzz
  1005. abcxyzzpqrrrabbxyyyypqAzz
  1006. 0: abcxyzzpqrrrabbxyyyypqAzz
  1007. aabcxyzzzpqrrrabbxyyyypqAzz
  1008. 0: aabcxyzzzpqrrrabbxyyyypqAzz
  1009. aaabcxyzzzzpqrrrabbxyyyypqAzz
  1010. 0: aaabcxyzzzzpqrrrabbxyyyypqAzz
  1011. aaaabcxyzzzzpqrrrabbxyyyypqAzz
  1012. 0: aaaabcxyzzzzpqrrrabbxyyyypqAzz
  1013. aaaabcxyzzzzpqrrrabbbxyyyypqAzz
  1014. 0: aaaabcxyzzzzpqrrrabbbxyyyypqAzz
  1015. aaaabcxyzzzzpqrrrabbbxyyyyypqAzz
  1016. 0: aaaabcxyzzzzpqrrrabbbxyyyyypqAzz
  1017. aaabcxyzpqrrrabbxyyyypABzz
  1018. 0: aaabcxyzpqrrrabbxyyyypABzz
  1019. aaabcxyzpqrrrabbxyyyypABBzz
  1020. 0: aaabcxyzpqrrrabbxyyyypABBzz
  1021. >>>aaabxyzpqrrrabbxyyyypqAzz
  1022. 0: aaabxyzpqrrrabbxyyyypqAzz
  1023. >aaaabxyzpqrrrabbxyyyypqAzz
  1024. 0: aaaabxyzpqrrrabbxyyyypqAzz
  1025. >>>>abcxyzpqrrrabbxyyyypqAzz
  1026. 0: abcxyzpqrrrabbxyyyypqAzz
  1027. *** Failers
  1028. No match
  1029. abxyzpqrrabbxyyyypqAzz
  1030. No match
  1031. abxyzpqrrrrabbxyyyypqAzz
  1032. No match
  1033. abxyzpqrrrabxyyyypqAzz
  1034. No match
  1035. aaaabcxyzzzzpqrrrabbbxyyyyyypqAzz
  1036. No match
  1037. aaaabcxyzzzzpqrrrabbbxyyypqAzz
  1038. No match
  1039. aaabcxyzpqrrrabbxyyyypqqqqqqqAzz
  1040. No match
  1041. /^(abc){1,2}zz/
  1042. abczz
  1043. 0: abczz
  1044. abcabczz
  1045. 0: abcabczz
  1046. *** Failers
  1047. No match
  1048. zz
  1049. No match
  1050. abcabcabczz
  1051. No match
  1052. >>abczz
  1053. No match
  1054. /^(b+?|a){1,2}?c/
  1055. bc
  1056. 0: bc
  1057. bbc
  1058. 0: bbc
  1059. bbbc
  1060. 0: bbbc
  1061. bac
  1062. 0: bac
  1063. bbac
  1064. 0: bbac
  1065. aac
  1066. 0: aac
  1067. abbbbbbbbbbbc
  1068. 0: abbbbbbbbbbbc
  1069. bbbbbbbbbbbac
  1070. 0: bbbbbbbbbbbac
  1071. *** Failers
  1072. No match
  1073. aaac
  1074. No match
  1075. abbbbbbbbbbbac
  1076. No match
  1077. /^(b+|a){1,2}c/
  1078. bc
  1079. 0: bc
  1080. bbc
  1081. 0: bbc
  1082. bbbc
  1083. 0: bbbc
  1084. bac
  1085. 0: bac
  1086. bbac
  1087. 0: bbac
  1088. aac
  1089. 0: aac
  1090. abbbbbbbbbbbc
  1091. 0: abbbbbbbbbbbc
  1092. bbbbbbbbbbbac
  1093. 0: bbbbbbbbbbbac
  1094. *** Failers
  1095. No match
  1096. aaac
  1097. No match
  1098. abbbbbbbbbbbac
  1099. No match
  1100. /^(b+|a){1,2}?bc/
  1101. bbc
  1102. 0: bbc
  1103. /^(b*|ba){1,2}?bc/
  1104. babc
  1105. 0: babc
  1106. bbabc
  1107. 0: bbabc
  1108. bababc
  1109. 0: bababc
  1110. *** Failers
  1111. No match
  1112. bababbc
  1113. No match
  1114. babababc
  1115. No match
  1116. /^(ba|b*){1,2}?bc/
  1117. babc
  1118. 0: babc
  1119. bbabc
  1120. 0: bbabc
  1121. bababc
  1122. 0: bababc
  1123. *** Failers
  1124. No match
  1125. bababbc
  1126. No match
  1127. babababc
  1128. No match
  1129. /^\ca\cA\c[\c{\c:/
  1130. \x01\x01\e;z
  1131. 0: \x01\x01\x1b;z
  1132. /^[ab\]cde]/
  1133. athing
  1134. 0: a
  1135. bthing
  1136. 0: b
  1137. ]thing
  1138. 0: ]
  1139. cthing
  1140. 0: c
  1141. dthing
  1142. 0: d
  1143. ething
  1144. 0: e
  1145. *** Failers
  1146. No match
  1147. fthing
  1148. No match
  1149. [thing
  1150. No match
  1151. \\thing
  1152. No match
  1153. /^[]cde]/
  1154. ]thing
  1155. 0: ]
  1156. cthing
  1157. 0: c
  1158. dthing
  1159. 0: d
  1160. ething
  1161. 0: e
  1162. *** Failers
  1163. No match
  1164. athing
  1165. No match
  1166. fthing
  1167. No match
  1168. /^[^ab\]cde]/
  1169. fthing
  1170. 0: f
  1171. [thing
  1172. 0: [
  1173. \\thing
  1174. 0: \
  1175. *** Failers
  1176. 0: *
  1177. athing
  1178. No match
  1179. bthing
  1180. No match
  1181. ]thing
  1182. No match
  1183. cthing
  1184. No match
  1185. dthing
  1186. No match
  1187. ething
  1188. No match
  1189. /^[^]cde]/
  1190. athing
  1191. 0: a
  1192. fthing
  1193. 0: f
  1194. *** Failers
  1195. 0: *
  1196. ]thing
  1197. No match
  1198. cthing
  1199. No match
  1200. dthing
  1201. No match
  1202. ething
  1203. No match
  1204. /^\Б/
  1205. Б
  1206. 0: \x81
  1207. /^/
  1208. 0: \xff
  1209. /^[0-9]+$/
  1210. 0
  1211. 0: 0
  1212. 1
  1213. 0: 1
  1214. 2
  1215. 0: 2
  1216. 3
  1217. 0: 3
  1218. 4
  1219. 0: 4
  1220. 5
  1221. 0: 5
  1222. 6
  1223. 0: 6
  1224. 7
  1225. 0: 7
  1226. 8
  1227. 0: 8
  1228. 9
  1229. 0: 9
  1230. 10
  1231. 0: 10
  1232. 100
  1233. 0: 100
  1234. *** Failers
  1235. No match
  1236. abc
  1237. No match
  1238. /^.*nter/
  1239. enter
  1240. 0: enter
  1241. inter
  1242. 0: inter
  1243. uponter
  1244. 0: uponter
  1245. /^xxx[0-9]+$/
  1246. xxx0
  1247. 0: xxx0
  1248. xxx1234
  1249. 0: xxx1234
  1250. *** Failers
  1251. No match
  1252. xxx
  1253. No match
  1254. /^.+[0-9][0-9][0-9]$/
  1255. x123
  1256. 0: x123
  1257. xx123
  1258. 0: xx123
  1259. 123456
  1260. 0: 123456
  1261. *** Failers
  1262. No match
  1263. 123
  1264. No match
  1265. x1234
  1266. 0: x1234
  1267. /^.+?[0-9][0-9][0-9]$/
  1268. x123
  1269. 0: x123
  1270. xx123
  1271. 0: xx123
  1272. 123456
  1273. 0: 123456
  1274. *** Failers
  1275. No match
  1276. 123
  1277. No match
  1278. x1234
  1279. 0: x1234
  1280. /^([^!]+)!(.+)=apquxz\.ixr\.zzz\.ac\.uk$/
  1281. abc!pqr=apquxz.ixr.zzz.ac.uk
  1282. 0: abc!pqr=apquxz.ixr.zzz.ac.uk
  1283. *** Failers
  1284. No match
  1285. !pqr=apquxz.ixr.zzz.ac.uk
  1286. No match
  1287. abc!=apquxz.ixr.zzz.ac.uk
  1288. No match
  1289. abc!pqr=apquxz:ixr.zzz.ac.uk
  1290. No match
  1291. abc!pqr=apquxz.ixr.zzz.ac.ukk
  1292. No match
  1293. /:/
  1294. Well, we need a colon: somewhere
  1295. 0: :
  1296. *** Fail if we don't
  1297. No match
  1298. /([\da-f:]+)$/i
  1299. 0abc
  1300. 0: 0abc
  1301. abc
  1302. 0: abc
  1303. fed
  1304. 0: fed
  1305. E
  1306. 0: E
  1307. ::
  1308. 0: ::
  1309. 5f03:12C0::932e
  1310. 0: 5f03:12C0::932e
  1311. fed def
  1312. 0: def
  1313. Any old stuff
  1314. 0: ff
  1315. *** Failers
  1316. No match
  1317. 0zzz
  1318. No match
  1319. gzzz
  1320. No match
  1321. fed\x20
  1322. No match
  1323. Any old rubbish
  1324. No match
  1325. /^.*\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/
  1326. .1.2.3
  1327. 0: .1.2.3
  1328. A.12.123.0
  1329. 0: A.12.123.0
  1330. *** Failers
  1331. No match
  1332. .1.2.3333
  1333. No match
  1334. 1.2.3
  1335. No match
  1336. 1234.2.3
  1337. No match
  1338. /^(\d+)\s+IN\s+SOA\s+(\S+)\s+(\S+)\s*\(\s*$/
  1339. 1 IN SOA non-sp1 non-sp2(
  1340. 0: 1 IN SOA non-sp1 non-sp2(
  1341. 1 IN SOA non-sp1 non-sp2 (
  1342. 0: 1 IN SOA non-sp1 non-sp2 (
  1343. *** Failers
  1344. No match
  1345. 1IN SOA non-sp1 non-sp2(
  1346. No match
  1347. /^[a-zA-Z\d][a-zA-Z\d\-]*(\.[a-zA-Z\d][a-zA-z\d\-]*)*\.$/
  1348. a.
  1349. 0: a.
  1350. Z.
  1351. 0: Z.
  1352. 2.
  1353. 0: 2.
  1354. ab-c.pq-r.
  1355. 0: ab-c.pq-r.
  1356. sxk.zzz.ac.uk.
  1357. 0: sxk.zzz.ac.uk.
  1358. x-.y-.
  1359. 0: x-.y-.
  1360. *** Failers
  1361. No match
  1362. -abc.peq.
  1363. No match
  1364. /^\*\.[a-z]([a-z\-\d]*[a-z\d]+)?(\.[a-z]([a-z\-\d]*[a-z\d]+)?)*$/
  1365. *.a
  1366. 0: *.a
  1367. *.b0-a
  1368. 0: *.b0-a
  1369. *.c3-b.c
  1370. 0: *.c3-b.c
  1371. *.c-a.b-c
  1372. 0: *.c-a.b-c
  1373. *** Failers
  1374. No match
  1375. *.0
  1376. No match
  1377. *.a-
  1378. No match
  1379. *.a-b.c-
  1380. No match
  1381. *.c-a.0-c
  1382. No match
  1383. /^(?=ab(de))(abd)(e)/
  1384. abde
  1385. 0: abde
  1386. /^(?!(ab)de|x)(abd)(f)/
  1387. abdf
  1388. 0: abdf
  1389. /^(?=(ab(cd)))(ab)/
  1390. abcd
  1391. 0: ab
  1392. /^[\da-f](\.[\da-f])*$/i
  1393. a.b.c.d
  1394. 0: a.b.c.d
  1395. A.B.C.D
  1396. 0: A.B.C.D
  1397. a.b.c.1.2.3.C
  1398. 0: a.b.c.1.2.3.C
  1399. /^\".*\"\s*(;.*)?$/
  1400. \"1234\"
  1401. 0: "1234"
  1402. \"abcd\" ;
  1403. 0: "abcd" ;
  1404. \"\" ; rhubarb
  1405. 0: "" ; rhubarb
  1406. *** Failers
  1407. No match
  1408. \"1234\" : things
  1409. No match
  1410. /^$/
  1411. \
  1412. 0:
  1413. *** Failers
  1414. No match
  1415. / ^ a (?# begins with a) b\sc (?# then b c) $ (?# then end)/x
  1416. ab c
  1417. 0: ab c
  1418. *** Failers
  1419. No match
  1420. abc
  1421. No match
  1422. ab cde
  1423. No match
  1424. /(?x) ^ a (?# begins with a) b\sc (?# then b c) $ (?# then end)/
  1425. ab c
  1426. 0: ab c
  1427. *** Failers
  1428. No match
  1429. abc
  1430. No match
  1431. ab cde
  1432. No match
  1433. /^ a\ b[c ]d $/x
  1434. a bcd
  1435. 0: a bcd
  1436. a b d
  1437. 0: a b d
  1438. *** Failers
  1439. No match
  1440. abcd
  1441. No match
  1442. ab d
  1443. No match
  1444. /^(a(b(c)))(d(e(f)))(h(i(j)))(k(l(m)))$/
  1445. abcdefhijklm
  1446. 0: abcdefhijklm
  1447. /^(?:a(b(c)))(?:d(e(f)))(?:h(i(j)))(?:k(l(m)))$/
  1448. abcdefhijklm
  1449. 0: abcdefhijklm
  1450. /^[\w][\W][\s][\S][\d][\D][\b][\n][\c]][\022]/
  1451. a+ Z0+\x08\n\x1d\x12
  1452. 0: a+ Z0+\x08\x0a\x1d\x12
  1453. /^[.^$|()*+?{,}]+/
  1454. .^\$(*+)|{?,?}
  1455. 0: .^$(*+)|{?,?}
  1456. 1: .^$(*+)|{?,?
  1457. 2: .^$(*+)|{?,
  1458. 3: .^$(*+)|{?
  1459. 4: .^$(*+)|{
  1460. 5: .^$(*+)|
  1461. 6: .^$(*+)
  1462. 7: .^$(*+
  1463. 8: .^$(*
  1464. 9: .^$(
  1465. 10: .^$
  1466. 11: .^
  1467. 12: .
  1468. /^a*\w/
  1469. z
  1470. 0: z
  1471. az
  1472. 0: az
  1473. 1: a
  1474. aaaz
  1475. 0: aaaz
  1476. 1: aaa
  1477. 2: aa
  1478. 3: a
  1479. a
  1480. 0: a
  1481. aa
  1482. 0: aa
  1483. 1: a
  1484. aaaa
  1485. 0: aaaa
  1486. 1: aaa
  1487. 2: aa
  1488. 3: a
  1489. a+
  1490. 0: a
  1491. aa+
  1492. 0: aa
  1493. 1: a
  1494. /^a*?\w/
  1495. z
  1496. 0: z
  1497. az
  1498. 0: az
  1499. 1: a
  1500. aaaz
  1501. 0: aaaz
  1502. 1: aaa
  1503. 2: aa
  1504. 3: a
  1505. a
  1506. 0: a
  1507. aa
  1508. 0: aa
  1509. 1: a
  1510. aaaa
  1511. 0: aaaa
  1512. 1: aaa
  1513. 2: aa
  1514. 3: a
  1515. a+
  1516. 0: a
  1517. aa+
  1518. 0: aa
  1519. 1: a
  1520. /^a+\w/
  1521. az
  1522. 0: az
  1523. aaaz
  1524. 0: aaaz
  1525. 1: aaa
  1526. 2: aa
  1527. aa
  1528. 0: aa
  1529. aaaa
  1530. 0: aaaa
  1531. 1: aaa
  1532. 2: aa
  1533. aa+
  1534. 0: aa
  1535. /^a+?\w/
  1536. az
  1537. 0: az
  1538. aaaz
  1539. 0: aaaz
  1540. 1: aaa
  1541. 2: aa
  1542. aa
  1543. 0: aa
  1544. aaaa
  1545. 0: aaaa
  1546. 1: aaa
  1547. 2: aa
  1548. aa+
  1549. 0: aa
  1550. /^\d{8}\w{2,}/
  1551. 1234567890
  1552. 0: 1234567890
  1553. 12345678ab
  1554. 0: 12345678ab
  1555. 12345678__
  1556. 0: 12345678__
  1557. *** Failers
  1558. No match
  1559. 1234567
  1560. No match
  1561. /^[aeiou\d]{4,5}$/
  1562. uoie
  1563. 0: uoie
  1564. 1234
  1565. 0: 1234
  1566. 12345
  1567. 0: 12345
  1568. aaaaa
  1569. 0: aaaaa
  1570. *** Failers
  1571. No match
  1572. 123456
  1573. No match
  1574. /^[aeiou\d]{4,5}?/
  1575. uoie
  1576. 0: uoie
  1577. 1234
  1578. 0: 1234
  1579. 12345
  1580. 0: 12345
  1581. 1: 1234
  1582. aaaaa
  1583. 0: aaaaa
  1584. 1: aaaa
  1585. 123456
  1586. 0: 12345
  1587. 1: 1234
  1588. /^From +([^ ]+) +[a-zA-Z][a-zA-Z][a-zA-Z] +[a-zA-Z][a-zA-Z][a-zA-Z] +[0-9]?[0-9] +[0-9][0-9]:[0-9][0-9]/
  1589. From abcd Mon Sep 01 12:33:02 1997
  1590. 0: From abcd Mon Sep 01 12:33
  1591. /^From\s+\S+\s+([a-zA-Z]{3}\s+){2}\d{1,2}\s+\d\d:\d\d/
  1592. From abcd Mon Sep 01 12:33:02 1997
  1593. 0: From abcd Mon Sep 01 12:33
  1594. From abcd Mon Sep 1 12:33:02 1997
  1595. 0: From abcd Mon Sep 1 12:33
  1596. *** Failers
  1597. No match
  1598. From abcd Sep 01 12:33:02 1997
  1599. No match
  1600. /^12.34/s
  1601. 12\n34
  1602. 0: 12\x0a34
  1603. 12\r34
  1604. 0: 12\x0d34
  1605. /\w+(?=\t)/
  1606. the quick brown\t fox
  1607. 0: brown
  1608. /foo(?!bar)(.*)/
  1609. foobar is foolish see?
  1610. 0: foolish see?
  1611. 1: foolish see
  1612. 2: foolish se
  1613. 3: foolish s
  1614. 4: foolish
  1615. 5: foolish
  1616. 6: foolis
  1617. 7: fooli
  1618. 8: fool
  1619. 9: foo
  1620. /(?:(?!foo)...|^.{0,2})bar(.*)/
  1621. foobar crowbar etc
  1622. 0: rowbar etc
  1623. 1: rowbar et
  1624. 2: rowbar e
  1625. 3: rowbar
  1626. 4: rowbar
  1627. barrel
  1628. 0: barrel
  1629. 1: barre
  1630. 2: barr
  1631. 3: bar
  1632. 2barrel
  1633. 0: 2barrel
  1634. 1: 2barre
  1635. 2: 2barr
  1636. 3: 2bar
  1637. A barrel
  1638. 0: A barrel
  1639. 1: A barre
  1640. 2: A barr
  1641. 3: A bar
  1642. /^(\D*)(?=\d)(?!123)/
  1643. abc456
  1644. 0: abc
  1645. *** Failers
  1646. No match
  1647. abc123
  1648. No match
  1649. /^1234(?# test newlines
  1650. inside)/
  1651. 1234
  1652. 0: 1234
  1653. /^1234 #comment in extended re
  1654. /x
  1655. 1234
  1656. 0: 1234
  1657. /#rhubarb
  1658. abcd/x
  1659. abcd
  1660. 0: abcd
  1661. /^abcd#rhubarb/x
  1662. abcd
  1663. 0: abcd
  1664. /(?!^)abc/
  1665. the abc
  1666. 0: abc
  1667. *** Failers
  1668. No match
  1669. abc
  1670. No match
  1671. /(?=^)abc/
  1672. abc
  1673. 0: abc
  1674. *** Failers
  1675. No match
  1676. the abc
  1677. No match
  1678. /^[ab]{1,3}(ab*|b)/
  1679. aabbbbb
  1680. 0: aabbbbb
  1681. 1: aabbbb
  1682. 2: aabbb
  1683. 3: aabb
  1684. 4: aab
  1685. 5: aa
  1686. /^[ab]{1,3}?(ab*|b)/
  1687. aabbbbb
  1688. 0: aabbbbb
  1689. 1: aabbbb
  1690. 2: aabbb
  1691. 3: aabb
  1692. 4: aab
  1693. 5: aa
  1694. /^[ab]{1,3}?(ab*?|b)/
  1695. aabbbbb
  1696. 0: aabbbbb
  1697. 1: aabbbb
  1698. 2: aabbb
  1699. 3: aabb
  1700. 4: aab
  1701. 5: aa
  1702. /^[ab]{1,3}(ab*?|b)/
  1703. aabbbbb
  1704. 0: aabbbbb
  1705. 1: aabbbb
  1706. 2: aabbb
  1707. 3: aabb
  1708. 4: aab
  1709. 5: aa
  1710. / (?: [\040\t] | \(
  1711. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  1712. \) )* # optional leading comment
  1713. (?: (?:
  1714. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  1715. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  1716. |
  1717. " (?: # opening quote...
  1718. [^\\\x80-\xff\n\015"] # Anything except backslash and quote
  1719. | # or
  1720. \\ [^\x80-\xff] # Escaped something (something != CR)
  1721. )* " # closing quote
  1722. ) # initial word
  1723. (?: (?: [\040\t] | \(
  1724. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  1725. \) )* \. (?: [\040\t] | \(
  1726. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  1727. \) )* (?:
  1728. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  1729. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  1730. |
  1731. " (?: # opening quote...
  1732. [^\\\x80-\xff\n\015"] # Anything except backslash and quote
  1733. | # or
  1734. \\ [^\x80-\xff] # Escaped something (something != CR)
  1735. )* " # closing quote
  1736. ) )* # further okay, if led by a period
  1737. (?: [\040\t] | \(
  1738. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  1739. \) )* @ (?: [\040\t] | \(
  1740. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  1741. \) )* (?:
  1742. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  1743. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  1744. | \[ # [
  1745. (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
  1746. \] # ]
  1747. ) # initial subdomain
  1748. (?: #
  1749. (?: [\040\t] | \(
  1750. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  1751. \) )* \. # if led by a period...
  1752. (?: [\040\t] | \(
  1753. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  1754. \) )* (?:
  1755. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  1756. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  1757. | \[ # [
  1758. (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
  1759. \] # ]
  1760. ) # ...further okay
  1761. )*
  1762. # address
  1763. | # or
  1764. (?:
  1765. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  1766. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  1767. |
  1768. " (?: # opening quote...
  1769. [^\\\x80-\xff\n\015"] # Anything except backslash and quote
  1770. | # or
  1771. \\ [^\x80-\xff] # Escaped something (something != CR)
  1772. )* " # closing quote
  1773. ) # one word, optionally followed by....
  1774. (?:
  1775. [^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] | # atom and space parts, or...
  1776. \(
  1777. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  1778. \) | # comments, or...
  1779. " (?: # opening quote...
  1780. [^\\\x80-\xff\n\015"] # Anything except backslash and quote
  1781. | # or
  1782. \\ [^\x80-\xff] # Escaped something (something != CR)
  1783. )* " # closing quote
  1784. # quoted strings
  1785. )*
  1786. < (?: [\040\t] | \(
  1787. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  1788. \) )* # leading <
  1789. (?: @ (?: [\040\t] | \(
  1790. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  1791. \) )* (?:
  1792. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  1793. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  1794. | \[ # [
  1795. (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
  1796. \] # ]
  1797. ) # initial subdomain
  1798. (?: #
  1799. (?: [\040\t] | \(
  1800. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  1801. \) )* \. # if led by a period...
  1802. (?: [\040\t] | \(
  1803. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  1804. \) )* (?:
  1805. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  1806. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  1807. | \[ # [
  1808. (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
  1809. \] # ]
  1810. ) # ...further okay
  1811. )*
  1812. (?: (?: [\040\t] | \(
  1813. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  1814. \) )* , (?: [\040\t] | \(
  1815. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  1816. \) )* @ (?: [\040\t] | \(
  1817. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  1818. \) )* (?:
  1819. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  1820. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  1821. | \[ # [
  1822. (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
  1823. \] # ]
  1824. ) # initial subdomain
  1825. (?: #
  1826. (?: [\040\t] | \(
  1827. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  1828. \) )* \. # if led by a period...
  1829. (?: [\040\t] | \(
  1830. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  1831. \) )* (?:
  1832. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  1833. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  1834. | \[ # [
  1835. (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
  1836. \] # ]
  1837. ) # ...further okay
  1838. )*
  1839. )* # further okay, if led by comma
  1840. : # closing colon
  1841. (?: [\040\t] | \(
  1842. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  1843. \) )* )? # optional route
  1844. (?:
  1845. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  1846. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  1847. |
  1848. " (?: # opening quote...
  1849. [^\\\x80-\xff\n\015"] # Anything except backslash and quote
  1850. | # or
  1851. \\ [^\x80-\xff] # Escaped something (something != CR)
  1852. )* " # closing quote
  1853. ) # initial word
  1854. (?: (?: [\040\t] | \(
  1855. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  1856. \) )* \. (?: [\040\t] | \(
  1857. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  1858. \) )* (?:
  1859. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  1860. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  1861. |
  1862. " (?: # opening quote...
  1863. [^\\\x80-\xff\n\015"] # Anything except backslash and quote
  1864. | # or
  1865. \\ [^\x80-\xff] # Escaped something (something != CR)
  1866. )* " # closing quote
  1867. ) )* # further okay, if led by a period
  1868. (?: [\040\t] | \(
  1869. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  1870. \) )* @ (?: [\040\t] | \(
  1871. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  1872. \) )* (?:
  1873. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  1874. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  1875. | \[ # [
  1876. (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
  1877. \] # ]
  1878. ) # initial subdomain
  1879. (?: #
  1880. (?: [\040\t] | \(
  1881. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  1882. \) )* \. # if led by a period...
  1883. (?: [\040\t] | \(
  1884. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  1885. \) )* (?:
  1886. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  1887. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  1888. | \[ # [
  1889. (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
  1890. \] # ]
  1891. ) # ...further okay
  1892. )*
  1893. # address spec
  1894. (?: [\040\t] | \(
  1895. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  1896. \) )* > # trailing >
  1897. # name and address
  1898. ) (?: [\040\t] | \(
  1899. (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
  1900. \) )* # optional trailing comment
  1901. /x
  1902. Alan Other <user\@dom.ain>
  1903. 0: Alan Other <user@dom.ain>
  1904. <user\@dom.ain>
  1905. 0: user@dom.ain
  1906. 1: user@dom
  1907. user\@dom.ain
  1908. 0: user@dom.ain
  1909. 1: user@dom
  1910. \"A. Other\" <user.1234\@dom.ain> (a comment)
  1911. 0: "A. Other" <user.1234@dom.ain> (a comment)
  1912. 1: "A. Other" <user.1234@dom.ain>
  1913. 2: "A. Other" <user.1234@dom.ain>
  1914. A. Other <user.1234\@dom.ain> (a comment)
  1915. 0: Other <user.1234@dom.ain> (a comment)
  1916. 1: Other <user.1234@dom.ain>
  1917. 2: Other <user.1234@dom.ain>
  1918. \"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"\@x400-re.lay
  1919. 0: "/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/"@x400-re.lay
  1920. 1: "/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/"@x400-re
  1921. A missing angle <user\@some.where
  1922. 0: user@some.where
  1923. 1: user@some
  1924. *** Failers
  1925. No match
  1926. The quick brown fox
  1927. No match
  1928. /[\040\t]* # Nab whitespace.
  1929. (?:
  1930. \( # (
  1931. [^\\\x80-\xff\n\015()] * # normal*
  1932. (?: # (
  1933. (?: \\ [^\x80-\xff] |
  1934. \( # (
  1935. [^\\\x80-\xff\n\015()] * # normal*
  1936. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
  1937. \) # )
  1938. ) # special
  1939. [^\\\x80-\xff\n\015()] * # normal*
  1940. )* # )*
  1941. \) # )
  1942. [\040\t]* )* # If comment found, allow more spaces.
  1943. # optional leading comment
  1944. (?:
  1945. (?:
  1946. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  1947. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  1948. # Atom
  1949. | # or
  1950. " # "
  1951. [^\\\x80-\xff\n\015"] * # normal
  1952. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
  1953. " # "
  1954. # Quoted string
  1955. )
  1956. [\040\t]* # Nab whitespace.
  1957. (?:
  1958. \( # (
  1959. [^\\\x80-\xff\n\015()] * # normal*
  1960. (?: # (
  1961. (?: \\ [^\x80-\xff] |
  1962. \( # (
  1963. [^\\\x80-\xff\n\015()] * # normal*
  1964. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
  1965. \) # )
  1966. ) # special
  1967. [^\\\x80-\xff\n\015()] * # normal*
  1968. )* # )*
  1969. \) # )
  1970. [\040\t]* )* # If comment found, allow more spaces.
  1971. (?:
  1972. \.
  1973. [\040\t]* # Nab whitespace.
  1974. (?:
  1975. \( # (
  1976. [^\\\x80-\xff\n\015()] * # normal*
  1977. (?: # (
  1978. (?: \\ [^\x80-\xff] |
  1979. \( # (
  1980. [^\\\x80-\xff\n\015()] * # normal*
  1981. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
  1982. \) # )
  1983. ) # special
  1984. [^\\\x80-\xff\n\015()] * # normal*
  1985. )* # )*
  1986. \) # )
  1987. [\040\t]* )* # If comment found, allow more spaces.
  1988. (?:
  1989. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  1990. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  1991. # Atom
  1992. | # or
  1993. " # "
  1994. [^\\\x80-\xff\n\015"] * # normal
  1995. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
  1996. " # "
  1997. # Quoted string
  1998. )
  1999. [\040\t]* # Nab whitespace.
  2000. (?:
  2001. \( # (
  2002. [^\\\x80-\xff\n\015()] * # normal*
  2003. (?: # (
  2004. (?: \\ [^\x80-\xff] |
  2005. \( # (
  2006. [^\\\x80-\xff\n\015()] * # normal*
  2007. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
  2008. \) # )
  2009. ) # special
  2010. [^\\\x80-\xff\n\015()] * # normal*
  2011. )* # )*
  2012. \) # )
  2013. [\040\t]* )* # If comment found, allow more spaces.
  2014. # additional words
  2015. )*
  2016. @
  2017. [\040\t]* # Nab whitespace.
  2018. (?:
  2019. \( # (
  2020. [^\\\x80-\xff\n\015()] * # normal*
  2021. (?: # (
  2022. (?: \\ [^\x80-\xff] |
  2023. \( # (
  2024. [^\\\x80-\xff\n\015()] * # normal*
  2025. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
  2026. \) # )
  2027. ) # special
  2028. [^\\\x80-\xff\n\015()] * # normal*
  2029. )* # )*
  2030. \) # )
  2031. [\040\t]* )* # If comment found, allow more spaces.
  2032. (?:
  2033. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  2034. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  2035. |
  2036. \[ # [
  2037. (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
  2038. \] # ]
  2039. )
  2040. [\040\t]* # Nab whitespace.
  2041. (?:
  2042. \( # (
  2043. [^\\\x80-\xff\n\015()] * # normal*
  2044. (?: # (
  2045. (?: \\ [^\x80-\xff] |
  2046. \( # (
  2047. [^\\\x80-\xff\n\015()] * # normal*
  2048. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
  2049. \) # )
  2050. ) # special
  2051. [^\\\x80-\xff\n\015()] * # normal*
  2052. )* # )*
  2053. \) # )
  2054. [\040\t]* )* # If comment found, allow more spaces.
  2055. # optional trailing comments
  2056. (?:
  2057. \.
  2058. [\040\t]* # Nab whitespace.
  2059. (?:
  2060. \( # (
  2061. [^\\\x80-\xff\n\015()] * # normal*
  2062. (?: # (
  2063. (?: \\ [^\x80-\xff] |
  2064. \( # (
  2065. [^\\\x80-\xff\n\015()] * # normal*
  2066. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
  2067. \) # )
  2068. ) # special
  2069. [^\\\x80-\xff\n\015()] * # normal*
  2070. )* # )*
  2071. \) # )
  2072. [\040\t]* )* # If comment found, allow more spaces.
  2073. (?:
  2074. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  2075. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  2076. |
  2077. \[ # [
  2078. (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
  2079. \] # ]
  2080. )
  2081. [\040\t]* # Nab whitespace.
  2082. (?:
  2083. \( # (
  2084. [^\\\x80-\xff\n\015()] * # normal*
  2085. (?: # (
  2086. (?: \\ [^\x80-\xff] |
  2087. \( # (
  2088. [^\\\x80-\xff\n\015()] * # normal*
  2089. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
  2090. \) # )
  2091. ) # special
  2092. [^\\\x80-\xff\n\015()] * # normal*
  2093. )* # )*
  2094. \) # )
  2095. [\040\t]* )* # If comment found, allow more spaces.
  2096. # optional trailing comments
  2097. )*
  2098. # address
  2099. | # or
  2100. (?:
  2101. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  2102. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  2103. # Atom
  2104. | # or
  2105. " # "
  2106. [^\\\x80-\xff\n\015"] * # normal
  2107. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
  2108. " # "
  2109. # Quoted string
  2110. )
  2111. # leading word
  2112. [^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] * # "normal" atoms and or spaces
  2113. (?:
  2114. (?:
  2115. \( # (
  2116. [^\\\x80-\xff\n\015()] * # normal*
  2117. (?: # (
  2118. (?: \\ [^\x80-\xff] |
  2119. \( # (
  2120. [^\\\x80-\xff\n\015()] * # normal*
  2121. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
  2122. \) # )
  2123. ) # special
  2124. [^\\\x80-\xff\n\015()] * # normal*
  2125. )* # )*
  2126. \) # )
  2127. |
  2128. " # "
  2129. [^\\\x80-\xff\n\015"] * # normal
  2130. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
  2131. " # "
  2132. ) # "special" comment or quoted string
  2133. [^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] * # more "normal"
  2134. )*
  2135. <
  2136. [\040\t]* # Nab whitespace.
  2137. (?:
  2138. \( # (
  2139. [^\\\x80-\xff\n\015()] * # normal*
  2140. (?: # (
  2141. (?: \\ [^\x80-\xff] |
  2142. \( # (
  2143. [^\\\x80-\xff\n\015()] * # normal*
  2144. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
  2145. \) # )
  2146. ) # special
  2147. [^\\\x80-\xff\n\015()] * # normal*
  2148. )* # )*
  2149. \) # )
  2150. [\040\t]* )* # If comment found, allow more spaces.
  2151. # <
  2152. (?:
  2153. @
  2154. [\040\t]* # Nab whitespace.
  2155. (?:
  2156. \( # (
  2157. [^\\\x80-\xff\n\015()] * # normal*
  2158. (?: # (
  2159. (?: \\ [^\x80-\xff] |
  2160. \( # (
  2161. [^\\\x80-\xff\n\015()] * # normal*
  2162. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
  2163. \) # )
  2164. ) # special
  2165. [^\\\x80-\xff\n\015()] * # normal*
  2166. )* # )*
  2167. \) # )
  2168. [\040\t]* )* # If comment found, allow more spaces.
  2169. (?:
  2170. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  2171. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  2172. |
  2173. \[ # [
  2174. (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
  2175. \] # ]
  2176. )
  2177. [\040\t]* # Nab whitespace.
  2178. (?:
  2179. \( # (
  2180. [^\\\x80-\xff\n\015()] * # normal*
  2181. (?: # (
  2182. (?: \\ [^\x80-\xff] |
  2183. \( # (
  2184. [^\\\x80-\xff\n\015()] * # normal*
  2185. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
  2186. \) # )
  2187. ) # special
  2188. [^\\\x80-\xff\n\015()] * # normal*
  2189. )* # )*
  2190. \) # )
  2191. [\040\t]* )* # If comment found, allow more spaces.
  2192. # optional trailing comments
  2193. (?:
  2194. \.
  2195. [\040\t]* # Nab whitespace.
  2196. (?:
  2197. \( # (
  2198. [^\\\x80-\xff\n\015()] * # normal*
  2199. (?: # (
  2200. (?: \\ [^\x80-\xff] |
  2201. \( # (
  2202. [^\\\x80-\xff\n\015()] * # normal*
  2203. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
  2204. \) # )
  2205. ) # special
  2206. [^\\\x80-\xff\n\015()] * # normal*
  2207. )* # )*
  2208. \) # )
  2209. [\040\t]* )* # If comment found, allow more spaces.
  2210. (?:
  2211. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  2212. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  2213. |
  2214. \[ # [
  2215. (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
  2216. \] # ]
  2217. )
  2218. [\040\t]* # Nab whitespace.
  2219. (?:
  2220. \( # (
  2221. [^\\\x80-\xff\n\015()] * # normal*
  2222. (?: # (
  2223. (?: \\ [^\x80-\xff] |
  2224. \( # (
  2225. [^\\\x80-\xff\n\015()] * # normal*
  2226. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
  2227. \) # )
  2228. ) # special
  2229. [^\\\x80-\xff\n\015()] * # normal*
  2230. )* # )*
  2231. \) # )
  2232. [\040\t]* )* # If comment found, allow more spaces.
  2233. # optional trailing comments
  2234. )*
  2235. (?: ,
  2236. [\040\t]* # Nab whitespace.
  2237. (?:
  2238. \( # (
  2239. [^\\\x80-\xff\n\015()] * # normal*
  2240. (?: # (
  2241. (?: \\ [^\x80-\xff] |
  2242. \( # (
  2243. [^\\\x80-\xff\n\015()] * # normal*
  2244. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
  2245. \) # )
  2246. ) # special
  2247. [^\\\x80-\xff\n\015()] * # normal*
  2248. )* # )*
  2249. \) # )
  2250. [\040\t]* )* # If comment found, allow more spaces.
  2251. @
  2252. [\040\t]* # Nab whitespace.
  2253. (?:
  2254. \( # (
  2255. [^\\\x80-\xff\n\015()] * # normal*
  2256. (?: # (
  2257. (?: \\ [^\x80-\xff] |
  2258. \( # (
  2259. [^\\\x80-\xff\n\015()] * # normal*
  2260. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
  2261. \) # )
  2262. ) # special
  2263. [^\\\x80-\xff\n\015()] * # normal*
  2264. )* # )*
  2265. \) # )
  2266. [\040\t]* )* # If comment found, allow more spaces.
  2267. (?:
  2268. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  2269. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  2270. |
  2271. \[ # [
  2272. (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
  2273. \] # ]
  2274. )
  2275. [\040\t]* # Nab whitespace.
  2276. (?:
  2277. \( # (
  2278. [^\\\x80-\xff\n\015()] * # normal*
  2279. (?: # (
  2280. (?: \\ [^\x80-\xff] |
  2281. \( # (
  2282. [^\\\x80-\xff\n\015()] * # normal*
  2283. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
  2284. \) # )
  2285. ) # special
  2286. [^\\\x80-\xff\n\015()] * # normal*
  2287. )* # )*
  2288. \) # )
  2289. [\040\t]* )* # If comment found, allow more spaces.
  2290. # optional trailing comments
  2291. (?:
  2292. \.
  2293. [\040\t]* # Nab whitespace.
  2294. (?:
  2295. \( # (
  2296. [^\\\x80-\xff\n\015()] * # normal*
  2297. (?: # (
  2298. (?: \\ [^\x80-\xff] |
  2299. \( # (
  2300. [^\\\x80-\xff\n\015()] * # normal*
  2301. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
  2302. \) # )
  2303. ) # special
  2304. [^\\\x80-\xff\n\015()] * # normal*
  2305. )* # )*
  2306. \) # )
  2307. [\040\t]* )* # If comment found, allow more spaces.
  2308. (?:
  2309. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  2310. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  2311. |
  2312. \[ # [
  2313. (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
  2314. \] # ]
  2315. )
  2316. [\040\t]* # Nab whitespace.
  2317. (?:
  2318. \( # (
  2319. [^\\\x80-\xff\n\015()] * # normal*
  2320. (?: # (
  2321. (?: \\ [^\x80-\xff] |
  2322. \( # (
  2323. [^\\\x80-\xff\n\015()] * # normal*
  2324. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
  2325. \) # )
  2326. ) # special
  2327. [^\\\x80-\xff\n\015()] * # normal*
  2328. )* # )*
  2329. \) # )
  2330. [\040\t]* )* # If comment found, allow more spaces.
  2331. # optional trailing comments
  2332. )*
  2333. )* # additional domains
  2334. :
  2335. [\040\t]* # Nab whitespace.
  2336. (?:
  2337. \( # (
  2338. [^\\\x80-\xff\n\015()] * # normal*
  2339. (?: # (
  2340. (?: \\ [^\x80-\xff] |
  2341. \( # (
  2342. [^\\\x80-\xff\n\015()] * # normal*
  2343. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
  2344. \) # )
  2345. ) # special
  2346. [^\\\x80-\xff\n\015()] * # normal*
  2347. )* # )*
  2348. \) # )
  2349. [\040\t]* )* # If comment found, allow more spaces.
  2350. # optional trailing comments
  2351. )? # optional route
  2352. (?:
  2353. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  2354. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  2355. # Atom
  2356. | # or
  2357. " # "
  2358. [^\\\x80-\xff\n\015"] * # normal
  2359. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
  2360. " # "
  2361. # Quoted string
  2362. )
  2363. [\040\t]* # Nab whitespace.
  2364. (?:
  2365. \( # (
  2366. [^\\\x80-\xff\n\015()] * # normal*
  2367. (?: # (
  2368. (?: \\ [^\x80-\xff] |
  2369. \( # (
  2370. [^\\\x80-\xff\n\015()] * # normal*
  2371. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
  2372. \) # )
  2373. ) # special
  2374. [^\\\x80-\xff\n\015()] * # normal*
  2375. )* # )*
  2376. \) # )
  2377. [\040\t]* )* # If comment found, allow more spaces.
  2378. (?:
  2379. \.
  2380. [\040\t]* # Nab whitespace.
  2381. (?:
  2382. \( # (
  2383. [^\\\x80-\xff\n\015()] * # normal*
  2384. (?: # (
  2385. (?: \\ [^\x80-\xff] |
  2386. \( # (
  2387. [^\\\x80-\xff\n\015()] * # normal*
  2388. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
  2389. \) # )
  2390. ) # special
  2391. [^\\\x80-\xff\n\015()] * # normal*
  2392. )* # )*
  2393. \) # )
  2394. [\040\t]* )* # If comment found, allow more spaces.
  2395. (?:
  2396. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  2397. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  2398. # Atom
  2399. | # or
  2400. " # "
  2401. [^\\\x80-\xff\n\015"] * # normal
  2402. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015"] * )* # ( special normal* )*
  2403. " # "
  2404. # Quoted string
  2405. )
  2406. [\040\t]* # Nab whitespace.
  2407. (?:
  2408. \( # (
  2409. [^\\\x80-\xff\n\015()] * # normal*
  2410. (?: # (
  2411. (?: \\ [^\x80-\xff] |
  2412. \( # (
  2413. [^\\\x80-\xff\n\015()] * # normal*
  2414. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
  2415. \) # )
  2416. ) # special
  2417. [^\\\x80-\xff\n\015()] * # normal*
  2418. )* # )*
  2419. \) # )
  2420. [\040\t]* )* # If comment found, allow more spaces.
  2421. # additional words
  2422. )*
  2423. @
  2424. [\040\t]* # Nab whitespace.
  2425. (?:
  2426. \( # (
  2427. [^\\\x80-\xff\n\015()] * # normal*
  2428. (?: # (
  2429. (?: \\ [^\x80-\xff] |
  2430. \( # (
  2431. [^\\\x80-\xff\n\015()] * # normal*
  2432. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
  2433. \) # )
  2434. ) # special
  2435. [^\\\x80-\xff\n\015()] * # normal*
  2436. )* # )*
  2437. \) # )
  2438. [\040\t]* )* # If comment found, allow more spaces.
  2439. (?:
  2440. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  2441. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  2442. |
  2443. \[ # [
  2444. (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
  2445. \] # ]
  2446. )
  2447. [\040\t]* # Nab whitespace.
  2448. (?:
  2449. \( # (
  2450. [^\\\x80-\xff\n\015()] * # normal*
  2451. (?: # (
  2452. (?: \\ [^\x80-\xff] |
  2453. \( # (
  2454. [^\\\x80-\xff\n\015()] * # normal*
  2455. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
  2456. \) # )
  2457. ) # special
  2458. [^\\\x80-\xff\n\015()] * # normal*
  2459. )* # )*
  2460. \) # )
  2461. [\040\t]* )* # If comment found, allow more spaces.
  2462. # optional trailing comments
  2463. (?:
  2464. \.
  2465. [\040\t]* # Nab whitespace.
  2466. (?:
  2467. \( # (
  2468. [^\\\x80-\xff\n\015()] * # normal*
  2469. (?: # (
  2470. (?: \\ [^\x80-\xff] |
  2471. \( # (
  2472. [^\\\x80-\xff\n\015()] * # normal*
  2473. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
  2474. \) # )
  2475. ) # special
  2476. [^\\\x80-\xff\n\015()] * # normal*
  2477. )* # )*
  2478. \) # )
  2479. [\040\t]* )* # If comment found, allow more spaces.
  2480. (?:
  2481. [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
  2482. (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
  2483. |
  2484. \[ # [
  2485. (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
  2486. \] # ]
  2487. )
  2488. [\040\t]* # Nab whitespace.
  2489. (?:
  2490. \( # (
  2491. [^\\\x80-\xff\n\015()] * # normal*
  2492. (?: # (
  2493. (?: \\ [^\x80-\xff] |
  2494. \( # (
  2495. [^\\\x80-\xff\n\015()] * # normal*
  2496. (?: \\ [^\x80-\xff] [^\\\x80-\xff\n\015()] * )* # (special normal*)*
  2497. \) # )
  2498. ) # special
  2499. [^\\\x80-\xff\n\015()] * # normal*
  2500. )* # )*
  2501. \) # )
  2502. [\040\t]* )* # If comment found, allow more spaces.
  2503. # optional trailing comments
  2504. )*
  2505. # address spec
  2506. > # >
  2507. # name and address
  2508. )
  2509. /x
  2510. Alan Other <user\@dom.ain>
  2511. 0: Alan Other <user@dom.ain>
  2512. <user\@dom.ain>
  2513. 0: user@dom.ain
  2514. 1: user@dom
  2515. user\@dom.ain
  2516. 0: user@dom.ain
  2517. 1: user@dom
  2518. \"A. Other\" <user.1234\@dom.ain> (a comment)
  2519. 0: "A. Other" <user.1234@dom.ain>
  2520. A. Other <user.1234\@dom.ain> (a comment)
  2521. 0: Other <user.1234@dom.ain>
  2522. \"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"\@x400-re.lay
  2523. 0: "/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/"@x400-re.lay
  2524. 1: "/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/"@x400-re
  2525. A missing angle <user\@some.where
  2526. 0: user@some.where
  2527. 1: user@some
  2528. *** Failers
  2529. No match
  2530. The quick brown fox
  2531. No match
  2532. /abc\0def\00pqr\000xyz\0000AB/
  2533. abc\0def\00pqr\000xyz\0000AB
  2534. 0: abc\x00def\x00pqr\x00xyz\x000AB
  2535. abc456 abc\0def\00pqr\000xyz\0000ABCDE
  2536. 0: abc\x00def\x00pqr\x00xyz\x000AB
  2537. /abc\x0def\x00pqr\x000xyz\x0000AB/
  2538. abc\x0def\x00pqr\x000xyz\x0000AB
  2539. 0: abc\x0def\x00pqr\x000xyz\x0000AB
  2540. abc456 abc\x0def\x00pqr\x000xyz\x0000ABCDE
  2541. 0: abc\x0def\x00pqr\x000xyz\x0000AB
  2542. /^[\000-\037]/
  2543. \0A
  2544. 0: \x00
  2545. \01B
  2546. 0: \x01
  2547. \037C
  2548. 0: \x1f
  2549. /\0*/
  2550. \0\0\0\0
  2551. 0: \x00\x00\x00\x00
  2552. 1: \x00\x00\x00
  2553. 2: \x00\x00
  2554. 3: \x00
  2555. 4:
  2556. /A\x0{2,3}Z/
  2557. The A\x0\x0Z
  2558. 0: A\x00\x00Z
  2559. An A\0\x0\0Z
  2560. 0: A\x00\x00\x00Z
  2561. *** Failers
  2562. No match
  2563. A\0Z
  2564. No match
  2565. A\0\x0\0\x0Z
  2566. No match
  2567. /^\s/
  2568. \040abc
  2569. 0:
  2570. \x0cabc
  2571. 0: \x0c
  2572. \nabc
  2573. 0: \x0a
  2574. \rabc
  2575. 0: \x0d
  2576. \tabc
  2577. 0: \x09
  2578. *** Failers
  2579. No match
  2580. abc
  2581. No match
  2582. /^a b
  2583. c/x
  2584. abc
  2585. 0: abc
  2586. /ab{1,3}bc/
  2587. abbbbc
  2588. 0: abbbbc
  2589. abbbc
  2590. 0: abbbc
  2591. abbc
  2592. 0: abbc
  2593. *** Failers
  2594. No match
  2595. abc
  2596. No match
  2597. abbbbbc
  2598. No match
  2599. /([^.]*)\.([^:]*):[T ]+(.*)/
  2600. track1.title:TBlah blah blah
  2601. 0: track1.title:TBlah blah blah
  2602. 1: track1.title:TBlah blah bla
  2603. 2: track1.title:TBlah blah bl
  2604. 3: track1.title:TBlah blah b
  2605. 4: track1.title:TBlah blah
  2606. 5: track1.title:TBlah blah
  2607. 6: track1.title:TBlah bla
  2608. 7: track1.title:TBlah bl
  2609. 8: track1.title:TBlah b
  2610. 9: track1.title:TBlah
  2611. 10: track1.title:TBlah
  2612. 11: track1.title:TBla
  2613. 12: track1.title:TBl
  2614. 13: track1.title:TB
  2615. 14: track1.title:T
  2616. /([^.]*)\.([^:]*):[T ]+(.*)/i
  2617. track1.title:TBlah blah blah
  2618. 0: track1.title:TBlah blah blah
  2619. 1: track1.title:TBlah blah bla
  2620. 2: track1.title:TBlah blah bl
  2621. 3: track1.title:TBlah blah b
  2622. 4: track1.title:TBlah blah
  2623. 5: track1.title:TBlah blah
  2624. 6: track1.title:TBlah bla
  2625. 7: track1.title:TBlah bl
  2626. 8: track1.title:TBlah b
  2627. 9: track1.title:TBlah
  2628. 10: track1.title:TBlah
  2629. 11: track1.title:TBla
  2630. 12: track1.title:TBl
  2631. 13: track1.title:TB
  2632. 14: track1.title:T
  2633. /([^.]*)\.([^:]*):[t ]+(.*)/i
  2634. track1.title:TBlah blah blah
  2635. 0: track1.title:TBlah blah blah
  2636. 1: track1.title:TBlah blah bla
  2637. 2: track1.title:TBlah blah bl
  2638. 3: track1.title:TBlah blah b
  2639. 4: track1.title:TBlah blah
  2640. 5: track1.title:TBlah blah
  2641. 6: track1.title:TBlah bla
  2642. 7: track1.title:TBlah bl
  2643. 8: track1.title:TBlah b
  2644. 9: track1.title:TBlah
  2645. 10: track1.title:TBlah
  2646. 11: track1.title:TBla
  2647. 12: track1.title:TBl
  2648. 13: track1.title:TB
  2649. 14: track1.title:T
  2650. /^[W-c]+$/
  2651. WXY_^abc
  2652. 0: WXY_^abc
  2653. *** Failers
  2654. No match
  2655. wxy
  2656. No match
  2657. /^[W-c]+$/i
  2658. WXY_^abc
  2659. 0: WXY_^abc
  2660. wxy_^ABC
  2661. 0: wxy_^ABC
  2662. /^[\x3f-\x5F]+$/i
  2663. WXY_^abc
  2664. 0: WXY_^abc
  2665. wxy_^ABC
  2666. 0: wxy_^ABC
  2667. /^abc$/m
  2668. abc
  2669. 0: abc
  2670. qqq\nabc
  2671. 0: abc
  2672. abc\nzzz
  2673. 0: abc
  2674. qqq\nabc\nzzz
  2675. 0: abc
  2676. /^abc$/
  2677. abc
  2678. 0: abc
  2679. *** Failers
  2680. No match
  2681. qqq\nabc
  2682. No match
  2683. abc\nzzz
  2684. No match
  2685. qqq\nabc\nzzz
  2686. No match
  2687. /\Aabc\Z/m
  2688. abc
  2689. 0: abc
  2690. abc\n
  2691. 0: abc
  2692. *** Failers
  2693. No match
  2694. qqq\nabc
  2695. No match
  2696. abc\nzzz
  2697. No match
  2698. qqq\nabc\nzzz
  2699. No match
  2700. /\A(.)*\Z/s
  2701. abc\ndef
  2702. 0: abc\x0adef
  2703. /\A(.)*\Z/m
  2704. *** Failers
  2705. 0: *** Failers
  2706. abc\ndef
  2707. No match
  2708. /(?:b)|(?::+)/
  2709. b::c
  2710. 0: b
  2711. c::b
  2712. 0: ::
  2713. 1: :
  2714. /[-az]+/
  2715. az-
  2716. 0: az-
  2717. 1: az
  2718. 2: a
  2719. *** Failers
  2720. 0: a
  2721. b
  2722. No match
  2723. /[az-]+/
  2724. za-
  2725. 0: za-
  2726. 1: za
  2727. 2: z
  2728. *** Failers
  2729. 0: a
  2730. b
  2731. No match
  2732. /[a\-z]+/
  2733. a-z
  2734. 0: a-z
  2735. 1: a-
  2736. 2: a
  2737. *** Failers
  2738. 0: a
  2739. b
  2740. No match
  2741. /[a-z]+/
  2742. abcdxyz
  2743. 0: abcdxyz
  2744. 1: abcdxy
  2745. 2: abcdx
  2746. 3: abcd
  2747. 4: abc
  2748. 5: ab
  2749. 6: a
  2750. /[\d-]+/
  2751. 12-34
  2752. 0: 12-34
  2753. 1: 12-3
  2754. 2: 12-
  2755. 3: 12
  2756. 4: 1
  2757. *** Failers
  2758. No match
  2759. aaa
  2760. No match
  2761. /[\d-z]+/
  2762. 12-34z
  2763. 0: 12-34z
  2764. 1: 12-34
  2765. 2: 12-3
  2766. 3: 12-
  2767. 4: 12
  2768. 5: 1
  2769. *** Failers
  2770. No match
  2771. aaa
  2772. No match
  2773. /\x5c/
  2774. \\
  2775. 0: \
  2776. /\x20Z/
  2777. the Zoo
  2778. 0: Z
  2779. *** Failers
  2780. No match
  2781. Zulu
  2782. No match
  2783. /ab{3cd/
  2784. ab{3cd
  2785. 0: ab{3cd
  2786. /ab{3,cd/
  2787. ab{3,cd
  2788. 0: ab{3,cd
  2789. /ab{3,4a}cd/
  2790. ab{3,4a}cd
  2791. 0: ab{3,4a}cd
  2792. /{4,5a}bc/
  2793. {4,5a}bc
  2794. 0: {4,5a}bc
  2795. /^a.b/<lf>
  2796. a\rb
  2797. 0: a\x0db
  2798. *** Failers
  2799. No match
  2800. a\nb
  2801. No match
  2802. /abc$/
  2803. abc
  2804. 0: abc
  2805. abc\n
  2806. 0: abc
  2807. *** Failers
  2808. No match
  2809. abc\ndef
  2810. No match
  2811. /(abc)\123/
  2812. abc\x53
  2813. 0: abcS
  2814. /(abc)\223/
  2815. abc\x93
  2816. 0: abc\x93
  2817. /(abc)\323/
  2818. abc\xd3
  2819. 0: abc\xd3
  2820. /(abc)\100/
  2821. abc\x40
  2822. 0: abc@
  2823. abc\100
  2824. 0: abc@
  2825. /(abc)\1000/
  2826. abc\x400
  2827. 0: abc@0
  2828. abc\x40\x30
  2829. 0: abc@0
  2830. abc\1000
  2831. 0: abc@0
  2832. abc\100\x30
  2833. 0: abc@0
  2834. abc\100\060
  2835. 0: abc@0
  2836. abc\100\60
  2837. 0: abc@0
  2838. /abc\81/
  2839. abc\081
  2840. 0: abc\x0081
  2841. abc\0\x38\x31
  2842. 0: abc\x0081
  2843. /abc\91/
  2844. abc\091
  2845. 0: abc\x0091
  2846. abc\0\x39\x31
  2847. 0: abc\x0091
  2848. /(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\12\123/
  2849. abcdefghijk\12S
  2850. 0: abcdefghijk\x0aS
  2851. /ab\idef/
  2852. abidef
  2853. 0: abidef
  2854. /a{0}bc/
  2855. bc
  2856. 0: bc
  2857. /(a|(bc)){0,0}?xyz/
  2858. xyz
  2859. 0: xyz
  2860. /abc[\10]de/
  2861. abc\010de
  2862. 0: abc\x08de
  2863. /abc[\1]de/
  2864. abc\1de
  2865. 0: abc\x01de
  2866. /(abc)[\1]de/
  2867. abc\1de
  2868. 0: abc\x01de
  2869. /(?s)a.b/
  2870. a\nb
  2871. 0: a\x0ab
  2872. /^([^a])([^\b])([^c]*)([^d]{3,4})/
  2873. baNOTccccd
  2874. 0: baNOTcccc
  2875. 1: baNOTccc
  2876. 2: baNOTcc
  2877. 3: baNOTc
  2878. 4: baNOT
  2879. baNOTcccd
  2880. 0: baNOTccc
  2881. 1: baNOTcc
  2882. 2: baNOTc
  2883. 3: baNOT
  2884. baNOTccd
  2885. 0: baNOTcc
  2886. 1: baNOTc
  2887. 2: baNOT
  2888. bacccd
  2889. 0: baccc
  2890. *** Failers
  2891. 0: *** Failers
  2892. 1: *** Failer
  2893. 2: *** Faile
  2894. 3: *** Fail
  2895. 4: *** Fai
  2896. 5: *** Fa
  2897. 6: *** F
  2898. anything
  2899. No match
  2900. b\bc
  2901. No match
  2902. baccd
  2903. No match
  2904. /[^a]/
  2905. Abc
  2906. 0: A
  2907. /[^a]/i
  2908. Abc
  2909. 0: b
  2910. /[^a]+/
  2911. AAAaAbc
  2912. 0: AAA
  2913. 1: AA
  2914. 2: A
  2915. /[^a]+/i
  2916. AAAaAbc
  2917. 0: bc
  2918. 1: b
  2919. /[^a]+/
  2920. bbb\nccc
  2921. 0: bbb\x0accc
  2922. 1: bbb\x0acc
  2923. 2: bbb\x0ac
  2924. 3: bbb\x0a
  2925. 4: bbb
  2926. 5: bb
  2927. 6: b
  2928. /[^k]$/
  2929. abc
  2930. 0: c
  2931. *** Failers
  2932. 0: s
  2933. abk
  2934. No match
  2935. /[^k]{2,3}$/
  2936. abc
  2937. 0: abc
  2938. kbc
  2939. 0: bc
  2940. kabc
  2941. 0: abc
  2942. *** Failers
  2943. 0: ers
  2944. abk
  2945. No match
  2946. akb
  2947. No match
  2948. akk
  2949. No match
  2950. /^\d{8,}\@.+[^k]$/
  2951. 12345678\@a.b.c.d
  2952. 0: 12345678@a.b.c.d
  2953. 123456789\@x.y.z
  2954. 0: 123456789@x.y.z
  2955. *** Failers
  2956. No match
  2957. 12345678\@x.y.uk
  2958. No match
  2959. 1234567\@a.b.c.d
  2960. No match
  2961. /[^a]/
  2962. aaaabcd
  2963. 0: b
  2964. aaAabcd
  2965. 0: A
  2966. /[^a]/i
  2967. aaaabcd
  2968. 0: b
  2969. aaAabcd
  2970. 0: b
  2971. /[^az]/
  2972. aaaabcd
  2973. 0: b
  2974. aaAabcd
  2975. 0: A
  2976. /[^az]/i
  2977. aaaabcd
  2978. 0: b
  2979. aaAabcd
  2980. 0: b
  2981. /\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131\132\133\134\135\136\137\140\141\142\143\144\145\146\147\150\151\152\153\154\155\156\157\160\161\162\163\164\165\166\167\170\171\172\173\174\175\176\177\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377/
  2982. \000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131\132\133\134\135\136\137\140\141\142\143\144\145\146\147\150\151\152\153\154\155\156\157\160\161\162\163\164\165\166\167\170\171\172\173\174\175\176\177\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377
  2983. 0: \x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x7f\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff
  2984. /P[^*]TAIRE[^*]{1,6}?LL/
  2985. xxxxxxxxxxxPSTAIREISLLxxxxxxxxx
  2986. 0: PSTAIREISLL
  2987. /P[^*]TAIRE[^*]{1,}?LL/
  2988. xxxxxxxxxxxPSTAIREISLLxxxxxxxxx
  2989. 0: PSTAIREISLL
  2990. /(\.\d\d[1-9]?)\d+/
  2991. 1.230003938
  2992. 0: .230003938
  2993. 1: .23000393
  2994. 2: .2300039
  2995. 3: .230003
  2996. 4: .23000
  2997. 5: .2300
  2998. 6: .230
  2999. 1.875000282
  3000. 0: .875000282
  3001. 1: .87500028
  3002. 2: .8750002
  3003. 3: .875000
  3004. 4: .87500
  3005. 5: .8750
  3006. 6: .875
  3007. 1.235
  3008. 0: .235
  3009. /(\.\d\d((?=0)|\d(?=\d)))/
  3010. 1.230003938
  3011. 0: .230
  3012. 1: .23
  3013. 1.875000282
  3014. 0: .875
  3015. *** Failers
  3016. No match
  3017. 1.235
  3018. No match
  3019. /a(?)b/
  3020. ab
  3021. 0: ab
  3022. /\b(foo)\s+(\w+)/i
  3023. Food is on the foo table
  3024. 0: foo table
  3025. 1: foo tabl
  3026. 2: foo tab
  3027. 3: foo ta
  3028. 4: foo t
  3029. /foo(.*)bar/
  3030. The food is under the bar in the barn.
  3031. 0: food is under the bar in the bar
  3032. 1: food is under the bar
  3033. /foo(.*?)bar/
  3034. The food is under the bar in the barn.
  3035. 0: food is under the bar in the bar
  3036. 1: food is under the bar
  3037. /(.*)(\d*)/
  3038. I have 2 numbers: 53147
  3039. Matched, but too many subsidiary matches
  3040. 0: I have 2 numbers: 53147
  3041. 1: I have 2 numbers: 5314
  3042. 2: I have 2 numbers: 531
  3043. 3: I have 2 numbers: 53
  3044. 4: I have 2 numbers: 5
  3045. 5: I have 2 numbers:
  3046. 6: I have 2 numbers:
  3047. 7: I have 2 numbers
  3048. 8: I have 2 number
  3049. 9: I have 2 numbe
  3050. 10: I have 2 numb
  3051. 11: I have 2 num
  3052. 12: I have 2 nu
  3053. 13: I have 2 n
  3054. 14: I have 2
  3055. 15: I have 2
  3056. 16: I have
  3057. 17: I have
  3058. 18: I hav
  3059. 19: I ha
  3060. 20: I h
  3061. 21: I
  3062. /(.*)(\d+)/
  3063. I have 2 numbers: 53147
  3064. 0: I have 2 numbers: 53147
  3065. 1: I have 2 numbers: 5314
  3066. 2: I have 2 numbers: 531
  3067. 3: I have 2 numbers: 53
  3068. 4: I have 2 numbers: 5
  3069. 5: I have 2
  3070. /(.*?)(\d*)/
  3071. I have 2 numbers: 53147
  3072. Matched, but too many subsidiary matches
  3073. 0: I have 2 numbers: 53147
  3074. 1: I have 2 numbers: 5314
  3075. 2: I have 2 numbers: 531
  3076. 3: I have 2 numbers: 53
  3077. 4: I have 2 numbers: 5
  3078. 5: I have 2 numbers:
  3079. 6: I have 2 numbers:
  3080. 7: I have 2 numbers
  3081. 8: I have 2 number
  3082. 9: I have 2 numbe
  3083. 10: I have 2 numb
  3084. 11: I have 2 num
  3085. 12: I have 2 nu
  3086. 13: I have 2 n
  3087. 14: I have 2
  3088. 15: I have 2
  3089. 16: I have
  3090. 17: I have
  3091. 18: I hav
  3092. 19: I ha
  3093. 20: I h
  3094. 21: I
  3095. /(.*?)(\d+)/
  3096. I have 2 numbers: 53147
  3097. 0: I have 2 numbers: 53147
  3098. 1: I have 2 numbers: 5314
  3099. 2: I have 2 numbers: 531
  3100. 3: I have 2 numbers: 53
  3101. 4: I have 2 numbers: 5
  3102. 5: I have 2
  3103. /(.*)(\d+)$/
  3104. I have 2 numbers: 53147
  3105. 0: I have 2 numbers: 53147
  3106. /(.*?)(\d+)$/
  3107. I have 2 numbers: 53147
  3108. 0: I have 2 numbers: 53147
  3109. /(.*)\b(\d+)$/
  3110. I have 2 numbers: 53147
  3111. 0: I have 2 numbers: 53147
  3112. /(.*\D)(\d+)$/
  3113. I have 2 numbers: 53147
  3114. 0: I have 2 numbers: 53147
  3115. /^\D*(?!123)/
  3116. ABC123
  3117. 0: AB
  3118. 1: A
  3119. 2:
  3120. /^(\D*)(?=\d)(?!123)/
  3121. ABC445
  3122. 0: ABC
  3123. *** Failers
  3124. No match
  3125. ABC123
  3126. No match
  3127. /^[W-]46]/
  3128. W46]789
  3129. 0: W46]
  3130. -46]789
  3131. 0: -46]
  3132. *** Failers
  3133. No match
  3134. Wall
  3135. No match
  3136. Zebra
  3137. No match
  3138. 42
  3139. No match
  3140. [abcd]
  3141. No match
  3142. ]abcd[
  3143. No match
  3144. /^[W-\]46]/
  3145. W46]789
  3146. 0: W
  3147. Wall
  3148. 0: W
  3149. Zebra
  3150. 0: Z
  3151. Xylophone
  3152. 0: X
  3153. 42
  3154. 0: 4
  3155. [abcd]
  3156. 0: [
  3157. ]abcd[
  3158. 0: ]
  3159. \\backslash
  3160. 0: \
  3161. *** Failers
  3162. No match
  3163. -46]789
  3164. No match
  3165. well
  3166. No match
  3167. /\d\d\/\d\d\/\d\d\d\d/
  3168. 01/01/2000
  3169. 0: 01/01/2000
  3170. /word (?:[a-zA-Z0-9]+ ){0,10}otherword/
  3171. word cat dog elephant mussel cow horse canary baboon snake shark otherword
  3172. 0: word cat dog elephant mussel cow horse canary baboon snake shark otherword
  3173. word cat dog elephant mussel cow horse canary baboon snake shark
  3174. No match
  3175. /word (?:[a-zA-Z0-9]+ ){0,300}otherword/
  3176. word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope
  3177. No match
  3178. /^(a){0,0}/
  3179. bcd
  3180. 0:
  3181. abc
  3182. 0:
  3183. aab
  3184. 0:
  3185. /^(a){0,1}/
  3186. bcd
  3187. 0:
  3188. abc
  3189. 0: a
  3190. 1:
  3191. aab
  3192. 0: a
  3193. 1:
  3194. /^(a){0,2}/
  3195. bcd
  3196. 0:
  3197. abc
  3198. 0: a
  3199. 1:
  3200. aab
  3201. 0: aa
  3202. 1: a
  3203. 2:
  3204. /^(a){0,3}/
  3205. bcd
  3206. 0:
  3207. abc
  3208. 0: a
  3209. 1:
  3210. aab
  3211. 0: aa
  3212. 1: a
  3213. 2:
  3214. aaa
  3215. 0: aaa
  3216. 1: aa
  3217. 2: a
  3218. 3:
  3219. /^(a){0,}/
  3220. bcd
  3221. 0:
  3222. abc
  3223. 0: a
  3224. 1:
  3225. aab
  3226. 0: aa
  3227. 1: a
  3228. 2:
  3229. aaa
  3230. 0: aaa
  3231. 1: aa
  3232. 2: a
  3233. 3:
  3234. aaaaaaaa
  3235. 0: aaaaaaaa
  3236. 1: aaaaaaa
  3237. 2: aaaaaa
  3238. 3: aaaaa
  3239. 4: aaaa
  3240. 5: aaa
  3241. 6: aa
  3242. 7: a
  3243. 8:
  3244. /^(a){1,1}/
  3245. bcd
  3246. No match
  3247. abc
  3248. 0: a
  3249. aab
  3250. 0: a
  3251. /^(a){1,2}/
  3252. bcd
  3253. No match
  3254. abc
  3255. 0: a
  3256. aab
  3257. 0: aa
  3258. 1: a
  3259. /^(a){1,3}/
  3260. bcd
  3261. No match
  3262. abc
  3263. 0: a
  3264. aab
  3265. 0: aa
  3266. 1: a
  3267. aaa
  3268. 0: aaa
  3269. 1: aa
  3270. 2: a
  3271. /^(a){1,}/
  3272. bcd
  3273. No match
  3274. abc
  3275. 0: a
  3276. aab
  3277. 0: aa
  3278. 1: a
  3279. aaa
  3280. 0: aaa
  3281. 1: aa
  3282. 2: a
  3283. aaaaaaaa
  3284. 0: aaaaaaaa
  3285. 1: aaaaaaa
  3286. 2: aaaaaa
  3287. 3: aaaaa
  3288. 4: aaaa
  3289. 5: aaa
  3290. 6: aa
  3291. 7: a
  3292. /.*\.gif/
  3293. borfle\nbib.gif\nno
  3294. 0: bib.gif
  3295. /.{0,}\.gif/
  3296. borfle\nbib.gif\nno
  3297. 0: bib.gif
  3298. /.*\.gif/m
  3299. borfle\nbib.gif\nno
  3300. 0: bib.gif
  3301. /.*\.gif/s
  3302. borfle\nbib.gif\nno
  3303. 0: borfle\x0abib.gif
  3304. /.*\.gif/ms
  3305. borfle\nbib.gif\nno
  3306. 0: borfle\x0abib.gif
  3307. /.*$/
  3308. borfle\nbib.gif\nno
  3309. 0: no
  3310. /.*$/m
  3311. borfle\nbib.gif\nno
  3312. 0: borfle
  3313. /.*$/s
  3314. borfle\nbib.gif\nno
  3315. 0: borfle\x0abib.gif\x0ano
  3316. /.*$/ms
  3317. borfle\nbib.gif\nno
  3318. 0: borfle\x0abib.gif\x0ano
  3319. 1: borfle\x0abib.gif
  3320. 2: borfle
  3321. /.*$/
  3322. borfle\nbib.gif\nno\n
  3323. 0: no
  3324. /.*$/m
  3325. borfle\nbib.gif\nno\n
  3326. 0: borfle
  3327. /.*$/s
  3328. borfle\nbib.gif\nno\n
  3329. 0: borfle\x0abib.gif\x0ano\x0a
  3330. 1: borfle\x0abib.gif\x0ano
  3331. /.*$/ms
  3332. borfle\nbib.gif\nno\n
  3333. 0: borfle\x0abib.gif\x0ano\x0a
  3334. 1: borfle\x0abib.gif\x0ano
  3335. 2: borfle\x0abib.gif
  3336. 3: borfle
  3337. /(.*X|^B)/
  3338. abcde\n1234Xyz
  3339. 0: 1234X
  3340. BarFoo
  3341. 0: B
  3342. *** Failers
  3343. No match
  3344. abcde\nBar
  3345. No match
  3346. /(.*X|^B)/m
  3347. abcde\n1234Xyz
  3348. 0: 1234X
  3349. BarFoo
  3350. 0: B
  3351. abcde\nBar
  3352. 0: B
  3353. /(.*X|^B)/s
  3354. abcde\n1234Xyz
  3355. 0: abcde\x0a1234X
  3356. BarFoo
  3357. 0: B
  3358. *** Failers
  3359. No match
  3360. abcde\nBar
  3361. No match
  3362. /(.*X|^B)/ms
  3363. abcde\n1234Xyz
  3364. 0: abcde\x0a1234X
  3365. BarFoo
  3366. 0: B
  3367. abcde\nBar
  3368. 0: B
  3369. /(?s)(.*X|^B)/
  3370. abcde\n1234Xyz
  3371. 0: abcde\x0a1234X
  3372. BarFoo
  3373. 0: B
  3374. *** Failers
  3375. No match
  3376. abcde\nBar
  3377. No match
  3378. /(?s:.*X|^B)/
  3379. abcde\n1234Xyz
  3380. 0: abcde\x0a1234X
  3381. BarFoo
  3382. 0: B
  3383. *** Failers
  3384. No match
  3385. abcde\nBar
  3386. No match
  3387. /^.*B/
  3388. **** Failers
  3389. No match
  3390. abc\nB
  3391. No match
  3392. /(?s)^.*B/
  3393. abc\nB
  3394. 0: abc\x0aB
  3395. /(?m)^.*B/
  3396. abc\nB
  3397. 0: B
  3398. /(?ms)^.*B/
  3399. abc\nB
  3400. 0: abc\x0aB
  3401. /(?ms)^B/
  3402. abc\nB
  3403. 0: B
  3404. /(?s)B$/
  3405. B\n
  3406. 0: B
  3407. /^[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/
  3408. 123456654321
  3409. 0: 123456654321
  3410. /^\d\d\d\d\d\d\d\d\d\d\d\d/
  3411. 123456654321
  3412. 0: 123456654321
  3413. /^[\d][\d][\d][\d][\d][\d][\d][\d][\d][\d][\d][\d]/
  3414. 123456654321
  3415. 0: 123456654321
  3416. /^[abc]{12}/
  3417. abcabcabcabc
  3418. 0: abcabcabcabc
  3419. /^[a-c]{12}/
  3420. abcabcabcabc
  3421. 0: abcabcabcabc
  3422. /^(a|b|c){12}/
  3423. abcabcabcabc
  3424. 0: abcabcabcabc
  3425. /^[abcdefghijklmnopqrstuvwxy0123456789]/
  3426. n
  3427. 0: n
  3428. *** Failers
  3429. No match
  3430. z
  3431. No match
  3432. /abcde{0,0}/
  3433. abcd
  3434. 0: abcd
  3435. *** Failers
  3436. No match
  3437. abce
  3438. No match
  3439. /ab[cd]{0,0}e/
  3440. abe
  3441. 0: abe
  3442. *** Failers
  3443. No match
  3444. abcde
  3445. No match
  3446. /ab(c){0,0}d/
  3447. abd
  3448. 0: abd
  3449. *** Failers
  3450. No match
  3451. abcd
  3452. No match
  3453. /a(b*)/
  3454. a
  3455. 0: a
  3456. ab
  3457. 0: ab
  3458. 1: a
  3459. abbbb
  3460. 0: abbbb
  3461. 1: abbb
  3462. 2: abb
  3463. 3: ab
  3464. 4: a
  3465. *** Failers
  3466. 0: a
  3467. bbbbb
  3468. No match
  3469. /ab\d{0}e/
  3470. abe
  3471. 0: abe
  3472. *** Failers
  3473. No match
  3474. ab1e
  3475. No match
  3476. /"([^\\"]+|\\.)*"/
  3477. the \"quick\" brown fox
  3478. 0: "quick"
  3479. \"the \\\"quick\\\" brown fox\"
  3480. 0: "the \"quick\" brown fox"
  3481. /.*?/g+
  3482. abc
  3483. 0: abc
  3484. 0+
  3485. 1: ab
  3486. 2: a
  3487. 3:
  3488. 0:
  3489. 0+
  3490. /\b/g+
  3491. abc
  3492. 0:
  3493. 0+ abc
  3494. 0:
  3495. 0+
  3496. /\b/+g
  3497. abc
  3498. 0:
  3499. 0+ abc
  3500. 0:
  3501. 0+
  3502. //g
  3503. abc
  3504. 0:
  3505. 0:
  3506. 0:
  3507. 0:
  3508. /<tr([\w\W\s\d][^<>]{0,})><TD([\w\W\s\d][^<>]{0,})>([\d]{0,}\.)(.*)((<BR>([\w\W\s\d][^<>]{0,})|[\s]{0,}))<\/a><\/TD><TD([\w\W\s\d][^<>]{0,})>([\w\W\s\d][^<>]{0,})<\/TD><TD([\w\W\s\d][^<>]{0,})>([\w\W\s\d][^<>]{0,})<\/TD><\/TR>/is
  3509. <TR BGCOLOR='#DBE9E9'><TD align=left valign=top>43.<a href='joblist.cfm?JobID=94 6735&Keyword='>Word Processor<BR>(N-1286)</a></TD><TD align=left valign=top>Lega lstaff.com</TD><TD align=left valign=top>CA - Statewide</TD></TR>
  3510. 0: <TR BGCOLOR='#DBE9E9'><TD align=left valign=top>43.<a href='joblist.cfm?JobID=94 6735&Keyword='>Word Processor<BR>(N-1286)</a></TD><TD align=left valign=top>Lega lstaff.com</TD><TD align=left valign=top>CA - Statewide</TD></TR>
  3511. /a[^a]b/
  3512. acb
  3513. 0: acb
  3514. a\nb
  3515. 0: a\x0ab
  3516. /a.b/
  3517. acb
  3518. 0: acb
  3519. *** Failers
  3520. No match
  3521. a\nb
  3522. No match
  3523. /a[^a]b/s
  3524. acb
  3525. 0: acb
  3526. a\nb
  3527. 0: a\x0ab
  3528. /a.b/s
  3529. acb
  3530. 0: acb
  3531. a\nb
  3532. 0: a\x0ab
  3533. /^(b+?|a){1,2}?c/
  3534. bac
  3535. 0: bac
  3536. bbac
  3537. 0: bbac
  3538. bbbac
  3539. 0: bbbac
  3540. bbbbac
  3541. 0: bbbbac
  3542. bbbbbac
  3543. 0: bbbbbac
  3544. /^(b+|a){1,2}?c/
  3545. bac
  3546. 0: bac
  3547. bbac
  3548. 0: bbac
  3549. bbbac
  3550. 0: bbbac
  3551. bbbbac
  3552. 0: bbbbac
  3553. bbbbbac
  3554. 0: bbbbbac
  3555. /(?!\A)x/m
  3556. x\nb\n
  3557. No match
  3558. a\bx\n
  3559. 0: x
  3560. /\x0{ab}/
  3561. \0{ab}
  3562. 0: \x00{ab}
  3563. /(A|B)*?CD/
  3564. CD
  3565. 0: CD
  3566. /(A|B)*CD/
  3567. CD
  3568. 0: CD
  3569. /(?<!bar)foo/
  3570. foo
  3571. 0: foo
  3572. catfood
  3573. 0: foo
  3574. arfootle
  3575. 0: foo
  3576. rfoosh
  3577. 0: foo
  3578. *** Failers
  3579. No match
  3580. barfoo
  3581. No match
  3582. towbarfoo
  3583. No match
  3584. /\w{3}(?<!bar)foo/
  3585. catfood
  3586. 0: catfoo
  3587. *** Failers
  3588. No match
  3589. foo
  3590. No match
  3591. barfoo
  3592. No match
  3593. towbarfoo
  3594. No match
  3595. /(?<=(foo)a)bar/
  3596. fooabar
  3597. 0: bar
  3598. *** Failers
  3599. No match
  3600. bar
  3601. No match
  3602. foobbar
  3603. No match
  3604. /\Aabc\z/m
  3605. abc
  3606. 0: abc
  3607. *** Failers
  3608. No match
  3609. abc\n
  3610. No match
  3611. qqq\nabc
  3612. No match
  3613. abc\nzzz
  3614. No match
  3615. qqq\nabc\nzzz
  3616. No match
  3617. "(?>.*/)foo"
  3618. /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/it/you/see/
  3619. No match
  3620. "(?>.*/)foo"
  3621. /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo
  3622. 0: /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo
  3623. /(?>(\.\d\d[1-9]?))\d+/
  3624. 1.230003938
  3625. 0: .230003938
  3626. 1: .23000393
  3627. 2: .2300039
  3628. 3: .230003
  3629. 4: .23000
  3630. 5: .2300
  3631. 6: .230
  3632. 1.875000282
  3633. 0: .875000282
  3634. 1: .87500028
  3635. 2: .8750002
  3636. 3: .875000
  3637. 4: .87500
  3638. 5: .8750
  3639. *** Failers
  3640. No match
  3641. 1.235
  3642. No match
  3643. /^((?>\w+)|(?>\s+))*$/
  3644. now is the time for all good men to come to the aid of the party
  3645. 0: now is the time for all good men to come to the aid of the party
  3646. *** Failers
  3647. No match
  3648. this is not a line with only words and spaces!
  3649. No match
  3650. /(\d+)(\w)/
  3651. 12345a
  3652. 0: 12345a
  3653. 1: 12345
  3654. 2: 1234
  3655. 3: 123
  3656. 4: 12
  3657. 12345+
  3658. 0: 12345
  3659. 1: 1234
  3660. 2: 123
  3661. 3: 12
  3662. /((?>\d+))(\w)/
  3663. 12345a
  3664. 0: 12345a
  3665. *** Failers
  3666. No match
  3667. 12345+
  3668. No match
  3669. /(?>a+)b/
  3670. aaab
  3671. 0: aaab
  3672. /((?>a+)b)/
  3673. aaab
  3674. 0: aaab
  3675. /(?>(a+))b/
  3676. aaab
  3677. 0: aaab
  3678. /(?>b)+/
  3679. aaabbbccc
  3680. 0: bbb
  3681. 1: bb
  3682. 2: b
  3683. /(?>a+|b+|c+)*c/
  3684. aaabbbbccccd
  3685. 0: aaabbbbcccc
  3686. 1: aaabbbbc
  3687. /(a+|b+|c+)*c/
  3688. aaabbbbccccd
  3689. 0: aaabbbbcccc
  3690. 1: aaabbbbccc
  3691. 2: aaabbbbcc
  3692. 3: aaabbbbc
  3693. /((?>[^()]+)|\([^()]*\))+/
  3694. ((abc(ade)ufh()()x
  3695. 0: abc(ade)ufh()()x
  3696. 1: abc(ade)ufh()()
  3697. 2: abc(ade)ufh()
  3698. 3: abc(ade)ufh
  3699. 4: abc(ade)
  3700. 5: abc
  3701. /\(((?>[^()]+)|\([^()]+\))+\)/
  3702. (abc)
  3703. 0: (abc)
  3704. (abc(def)xyz)
  3705. 0: (abc(def)xyz)
  3706. *** Failers
  3707. No match
  3708. ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  3709. No match
  3710. /a(?-i)b/i
  3711. ab
  3712. 0: ab
  3713. Ab
  3714. 0: Ab
  3715. *** Failers
  3716. No match
  3717. aB
  3718. No match
  3719. AB
  3720. No match
  3721. /(a (?x)b c)d e/
  3722. a bcd e
  3723. 0: a bcd e
  3724. *** Failers
  3725. No match
  3726. a b cd e
  3727. No match
  3728. abcd e
  3729. No match
  3730. a bcde
  3731. No match
  3732. /(a b(?x)c d (?-x)e f)/
  3733. a bcde f
  3734. 0: a bcde f
  3735. *** Failers
  3736. No match
  3737. abcdef
  3738. No match
  3739. /(a(?i)b)c/
  3740. abc
  3741. 0: abc
  3742. aBc
  3743. 0: aBc
  3744. *** Failers
  3745. No match
  3746. abC
  3747. No match
  3748. aBC
  3749. No match
  3750. Abc
  3751. No match
  3752. ABc
  3753. No match
  3754. ABC
  3755. No match
  3756. AbC
  3757. No match
  3758. /a(?i:b)c/
  3759. abc
  3760. 0: abc
  3761. aBc
  3762. 0: aBc
  3763. *** Failers
  3764. No match
  3765. ABC
  3766. No match
  3767. abC
  3768. No match
  3769. aBC
  3770. No match
  3771. /a(?i:b)*c/
  3772. aBc
  3773. 0: aBc
  3774. aBBc
  3775. 0: aBBc
  3776. *** Failers
  3777. No match
  3778. aBC
  3779. No match
  3780. aBBC
  3781. No match
  3782. /a(?=b(?i)c)\w\wd/
  3783. abcd
  3784. 0: abcd
  3785. abCd
  3786. 0: abCd
  3787. *** Failers
  3788. No match
  3789. aBCd
  3790. No match
  3791. abcD
  3792. No match
  3793. /(?s-i:more.*than).*million/i
  3794. more than million
  3795. 0: more than million
  3796. more than MILLION
  3797. 0: more than MILLION
  3798. more \n than Million
  3799. 0: more \x0a than Million
  3800. *** Failers
  3801. No match
  3802. MORE THAN MILLION
  3803. No match
  3804. more \n than \n million
  3805. No match
  3806. /(?:(?s-i)more.*than).*million/i
  3807. more than million
  3808. 0: more than million
  3809. more than MILLION
  3810. 0: more than MILLION
  3811. more \n than Million
  3812. 0: more \x0a than Million
  3813. *** Failers
  3814. No match
  3815. MORE THAN MILLION
  3816. No match
  3817. more \n than \n million
  3818. No match
  3819. /(?>a(?i)b+)+c/
  3820. abc
  3821. 0: abc
  3822. aBbc
  3823. 0: aBbc
  3824. aBBc
  3825. 0: aBBc
  3826. *** Failers
  3827. No match
  3828. Abc
  3829. No match
  3830. abAb
  3831. No match
  3832. abbC
  3833. No match
  3834. /(?=a(?i)b)\w\wc/
  3835. abc
  3836. 0: abc
  3837. aBc
  3838. 0: aBc
  3839. *** Failers
  3840. No match
  3841. Ab
  3842. No match
  3843. abC
  3844. No match
  3845. aBC
  3846. No match
  3847. /(?<=a(?i)b)(\w\w)c/
  3848. abxxc
  3849. 0: xxc
  3850. aBxxc
  3851. 0: xxc
  3852. *** Failers
  3853. No match
  3854. Abxxc
  3855. No match
  3856. ABxxc
  3857. No match
  3858. abxxC
  3859. No match
  3860. /^(?(?=abc)\w{3}:|\d\d)$/
  3861. abc:
  3862. 0: abc:
  3863. 12
  3864. 0: 12
  3865. *** Failers
  3866. No match
  3867. 123
  3868. No match
  3869. xyz
  3870. No match
  3871. /^(?(?!abc)\d\d|\w{3}:)$/
  3872. abc:
  3873. 0: abc:
  3874. 12
  3875. 0: 12
  3876. *** Failers
  3877. No match
  3878. 123
  3879. No match
  3880. xyz
  3881. No match
  3882. /(?(?<=foo)bar|cat)/
  3883. foobar
  3884. 0: bar
  3885. cat
  3886. 0: cat
  3887. fcat
  3888. 0: cat
  3889. focat
  3890. 0: cat
  3891. *** Failers
  3892. No match
  3893. foocat
  3894. No match
  3895. /(?(?<!foo)cat|bar)/
  3896. foobar
  3897. 0: bar
  3898. cat
  3899. 0: cat
  3900. fcat
  3901. 0: cat
  3902. focat
  3903. 0: cat
  3904. *** Failers
  3905. No match
  3906. foocat
  3907. No match
  3908. /(?>a*)*/
  3909. a
  3910. 0: a
  3911. 1:
  3912. aa
  3913. 0: aa
  3914. 1:
  3915. aaaa
  3916. 0: aaaa
  3917. 1:
  3918. /(abc|)+/
  3919. abc
  3920. 0: abc
  3921. 1:
  3922. abcabc
  3923. 0: abcabc
  3924. 1: abc
  3925. 2:
  3926. abcabcabc
  3927. 0: abcabcabc
  3928. 1: abcabc
  3929. 2: abc
  3930. 3:
  3931. xyz
  3932. 0:
  3933. /([a]*)*/
  3934. a
  3935. 0: a
  3936. 1:
  3937. aaaaa
  3938. 0: aaaaa
  3939. 1: aaaa
  3940. 2: aaa
  3941. 3: aa
  3942. 4: a
  3943. 5:
  3944. /([ab]*)*/
  3945. a
  3946. 0: a
  3947. 1:
  3948. b
  3949. 0: b
  3950. 1:
  3951. ababab
  3952. 0: ababab
  3953. 1: ababa
  3954. 2: abab
  3955. 3: aba
  3956. 4: ab
  3957. 5: a
  3958. 6:
  3959. aaaabcde
  3960. 0: aaaab
  3961. 1: aaaa
  3962. 2: aaa
  3963. 3: aa
  3964. 4: a
  3965. 5:
  3966. bbbb
  3967. 0: bbbb
  3968. 1: bbb
  3969. 2: bb
  3970. 3: b
  3971. 4:
  3972. /([^a]*)*/
  3973. b
  3974. 0: b
  3975. 1:
  3976. bbbb
  3977. 0: bbbb
  3978. 1: bbb
  3979. 2: bb
  3980. 3: b
  3981. 4:
  3982. aaa
  3983. 0:
  3984. /([^ab]*)*/
  3985. cccc
  3986. 0: cccc
  3987. 1: ccc
  3988. 2: cc
  3989. 3: c
  3990. 4:
  3991. abab
  3992. 0:
  3993. /([a]*?)*/
  3994. a
  3995. 0: a
  3996. 1:
  3997. aaaa
  3998. 0: aaaa
  3999. 1: aaa
  4000. 2: aa
  4001. 3: a
  4002. 4:
  4003. /([ab]*?)*/
  4004. a
  4005. 0: a
  4006. 1:
  4007. b
  4008. 0: b
  4009. 1:
  4010. abab
  4011. 0: abab
  4012. 1: aba
  4013. 2: ab
  4014. 3: a
  4015. 4:
  4016. baba
  4017. 0: baba
  4018. 1: bab
  4019. 2: ba
  4020. 3: b
  4021. 4:
  4022. /([^a]*?)*/
  4023. b
  4024. 0: b
  4025. 1:
  4026. bbbb
  4027. 0: bbbb
  4028. 1: bbb
  4029. 2: bb
  4030. 3: b
  4031. 4:
  4032. aaa
  4033. 0:
  4034. /([^ab]*?)*/
  4035. c
  4036. 0: c
  4037. 1:
  4038. cccc
  4039. 0: cccc
  4040. 1: ccc
  4041. 2: cc
  4042. 3: c
  4043. 4:
  4044. baba
  4045. 0:
  4046. /(?>a*)*/
  4047. a
  4048. 0: a
  4049. 1:
  4050. aaabcde
  4051. 0: aaa
  4052. 1:
  4053. /((?>a*))*/
  4054. aaaaa
  4055. 0: aaaaa
  4056. 1:
  4057. aabbaa
  4058. 0: aa
  4059. 1:
  4060. /((?>a*?))*/
  4061. aaaaa
  4062. 0: aaaaa
  4063. 1:
  4064. aabbaa
  4065. 0: aa
  4066. 1:
  4067. /(?(?=[^a-z]+[a-z]) \d{2}-[a-z]{3}-\d{2} | \d{2}-\d{2}-\d{2} ) /x
  4068. 12-sep-98
  4069. 0: 12-sep-98
  4070. 12-09-98
  4071. 0: 12-09-98
  4072. *** Failers
  4073. No match
  4074. sep-12-98
  4075. No match
  4076. /(?i:saturday|sunday)/
  4077. saturday
  4078. 0: saturday
  4079. sunday
  4080. 0: sunday
  4081. Saturday
  4082. 0: Saturday
  4083. Sunday
  4084. 0: Sunday
  4085. SATURDAY
  4086. 0: SATURDAY
  4087. SUNDAY
  4088. 0: SUNDAY
  4089. SunDay
  4090. 0: SunDay
  4091. /(a(?i)bc|BB)x/
  4092. abcx
  4093. 0: abcx
  4094. aBCx
  4095. 0: aBCx
  4096. bbx
  4097. 0: bbx
  4098. BBx
  4099. 0: BBx
  4100. *** Failers
  4101. No match
  4102. abcX
  4103. No match
  4104. aBCX
  4105. No match
  4106. bbX
  4107. No match
  4108. BBX
  4109. No match
  4110. /^([ab](?i)[cd]|[ef])/
  4111. ac
  4112. 0: ac
  4113. aC
  4114. 0: aC
  4115. bD
  4116. 0: bD
  4117. elephant
  4118. 0: e
  4119. Europe
  4120. 0: E
  4121. frog
  4122. 0: f
  4123. France
  4124. 0: F
  4125. *** Failers
  4126. No match
  4127. Africa
  4128. No match
  4129. /^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)/
  4130. ab
  4131. 0: ab
  4132. aBd
  4133. 0: aBd
  4134. xy
  4135. 0: xy
  4136. xY
  4137. 0: xY
  4138. zebra
  4139. 0: z
  4140. Zambesi
  4141. 0: Z
  4142. *** Failers
  4143. No match
  4144. aCD
  4145. No match
  4146. XY
  4147. No match
  4148. /(?<=foo\n)^bar/m
  4149. foo\nbar
  4150. 0: bar
  4151. *** Failers
  4152. No match
  4153. bar
  4154. No match
  4155. baz\nbar
  4156. No match
  4157. /(?<=(?<!foo)bar)baz/
  4158. barbaz
  4159. 0: baz
  4160. barbarbaz
  4161. 0: baz
  4162. koobarbaz
  4163. 0: baz
  4164. *** Failers
  4165. No match
  4166. baz
  4167. No match
  4168. foobarbaz
  4169. No match
  4170. /The following tests are taken from the Perl 5.005 test suite; some of them/
  4171. /are compatible with 5.004, but I'd rather not have to sort them out./
  4172. No match
  4173. /abc/
  4174. abc
  4175. 0: abc
  4176. xabcy
  4177. 0: abc
  4178. ababc
  4179. 0: abc
  4180. *** Failers
  4181. No match
  4182. xbc
  4183. No match
  4184. axc
  4185. No match
  4186. abx
  4187. No match
  4188. /ab*c/
  4189. abc
  4190. 0: abc
  4191. /ab*bc/
  4192. abc
  4193. 0: abc
  4194. abbc
  4195. 0: abbc
  4196. abbbbc
  4197. 0: abbbbc
  4198. /.{1}/
  4199. abbbbc
  4200. 0: a
  4201. /.{3,4}/
  4202. abbbbc
  4203. 0: abbb
  4204. 1: abb
  4205. /ab{0,}bc/
  4206. abbbbc
  4207. 0: abbbbc
  4208. /ab+bc/
  4209. abbc
  4210. 0: abbc
  4211. *** Failers
  4212. No match
  4213. abc
  4214. No match
  4215. abq
  4216. No match
  4217. /ab{1,}bc/
  4218. /ab+bc/
  4219. abbbbc
  4220. 0: abbbbc
  4221. /ab{1,}bc/
  4222. abbbbc
  4223. 0: abbbbc
  4224. /ab{1,3}bc/
  4225. abbbbc
  4226. 0: abbbbc
  4227. /ab{3,4}bc/
  4228. abbbbc
  4229. 0: abbbbc
  4230. /ab{4,5}bc/
  4231. *** Failers
  4232. No match
  4233. abq
  4234. No match
  4235. abbbbc
  4236. No match
  4237. /ab?bc/
  4238. abbc
  4239. 0: abbc
  4240. abc
  4241. 0: abc
  4242. /ab{0,1}bc/
  4243. abc
  4244. 0: abc
  4245. /ab?bc/
  4246. /ab?c/
  4247. abc
  4248. 0: abc
  4249. /ab{0,1}c/
  4250. abc
  4251. 0: abc
  4252. /^abc$/
  4253. abc
  4254. 0: abc
  4255. *** Failers
  4256. No match
  4257. abbbbc
  4258. No match
  4259. abcc
  4260. No match
  4261. /^abc/
  4262. abcc
  4263. 0: abc
  4264. /^abc$/
  4265. /abc$/
  4266. aabc
  4267. 0: abc
  4268. *** Failers
  4269. No match
  4270. aabc
  4271. 0: abc
  4272. aabcd
  4273. No match
  4274. /^/
  4275. abc
  4276. 0:
  4277. /$/
  4278. abc
  4279. 0:
  4280. /a.c/
  4281. abc
  4282. 0: abc
  4283. axc
  4284. 0: axc
  4285. /a.*c/
  4286. axyzc
  4287. 0: axyzc
  4288. /a[bc]d/
  4289. abd
  4290. 0: abd
  4291. *** Failers
  4292. No match
  4293. axyzd
  4294. No match
  4295. abc
  4296. No match
  4297. /a[b-d]e/
  4298. ace
  4299. 0: ace
  4300. /a[b-d]/
  4301. aac
  4302. 0: ac
  4303. /a[-b]/
  4304. a-
  4305. 0: a-
  4306. /a[b-]/
  4307. a-
  4308. 0: a-
  4309. /a]/
  4310. a]
  4311. 0: a]
  4312. /a[]]b/
  4313. a]b
  4314. 0: a]b
  4315. /a[^bc]d/
  4316. aed
  4317. 0: aed
  4318. *** Failers
  4319. No match
  4320. abd
  4321. No match
  4322. abd
  4323. No match
  4324. /a[^-b]c/
  4325. adc
  4326. 0: adc
  4327. /a[^]b]c/
  4328. adc
  4329. 0: adc
  4330. *** Failers
  4331. No match
  4332. a-c
  4333. 0: a-c
  4334. a]c
  4335. No match
  4336. /\ba\b/
  4337. a-
  4338. 0: a
  4339. -a
  4340. 0: a
  4341. -a-
  4342. 0: a
  4343. /\by\b/
  4344. *** Failers
  4345. No match
  4346. xy
  4347. No match
  4348. yz
  4349. No match
  4350. xyz
  4351. No match
  4352. /\Ba\B/
  4353. *** Failers
  4354. 0: a
  4355. a-
  4356. No match
  4357. -a
  4358. No match
  4359. -a-
  4360. No match
  4361. /\By\b/
  4362. xy
  4363. 0: y
  4364. /\by\B/
  4365. yz
  4366. 0: y
  4367. /\By\B/
  4368. xyz
  4369. 0: y
  4370. /\w/
  4371. a
  4372. 0: a
  4373. /\W/
  4374. -
  4375. 0: -
  4376. *** Failers
  4377. 0: *
  4378. -
  4379. 0: -
  4380. a
  4381. No match
  4382. /a\sb/
  4383. a b
  4384. 0: a b
  4385. /a\Sb/
  4386. a-b
  4387. 0: a-b
  4388. *** Failers
  4389. No match
  4390. a-b
  4391. 0: a-b
  4392. a b
  4393. No match
  4394. /\d/
  4395. 1
  4396. 0: 1
  4397. /\D/
  4398. -
  4399. 0: -
  4400. *** Failers
  4401. 0: *
  4402. -
  4403. 0: -
  4404. 1
  4405. No match
  4406. /[\w]/
  4407. a
  4408. 0: a
  4409. /[\W]/
  4410. -
  4411. 0: -
  4412. *** Failers
  4413. 0: *
  4414. -
  4415. 0: -
  4416. a
  4417. No match
  4418. /a[\s]b/
  4419. a b
  4420. 0: a b
  4421. /a[\S]b/
  4422. a-b
  4423. 0: a-b
  4424. *** Failers
  4425. No match
  4426. a-b
  4427. 0: a-b
  4428. a b
  4429. No match
  4430. /[\d]/
  4431. 1
  4432. 0: 1
  4433. /[\D]/
  4434. -
  4435. 0: -
  4436. *** Failers
  4437. 0: *
  4438. -
  4439. 0: -
  4440. 1
  4441. No match
  4442. /ab|cd/
  4443. abc
  4444. 0: ab
  4445. abcd
  4446. 0: ab
  4447. /()ef/
  4448. def
  4449. 0: ef
  4450. /$b/
  4451. /a\(b/
  4452. a(b
  4453. 0: a(b
  4454. /a\(*b/
  4455. ab
  4456. 0: ab
  4457. a((b
  4458. 0: a((b
  4459. /a\\b/
  4460. a\b
  4461. No match
  4462. /((a))/
  4463. abc
  4464. 0: a
  4465. /(a)b(c)/
  4466. abc
  4467. 0: abc
  4468. /a+b+c/
  4469. aabbabc
  4470. 0: abc
  4471. /a{1,}b{1,}c/
  4472. aabbabc
  4473. 0: abc
  4474. /a.+?c/
  4475. abcabc
  4476. 0: abcabc
  4477. 1: abc
  4478. /(a+|b)*/
  4479. ab
  4480. 0: ab
  4481. 1: a
  4482. 2:
  4483. /(a+|b){0,}/
  4484. ab
  4485. 0: ab
  4486. 1: a
  4487. 2:
  4488. /(a+|b)+/
  4489. ab
  4490. 0: ab
  4491. 1: a
  4492. /(a+|b){1,}/
  4493. ab
  4494. 0: ab
  4495. 1: a
  4496. /(a+|b)?/
  4497. ab
  4498. 0: a
  4499. 1:
  4500. /(a+|b){0,1}/
  4501. ab
  4502. 0: a
  4503. 1:
  4504. /[^ab]*/
  4505. cde
  4506. 0: cde
  4507. 1: cd
  4508. 2: c
  4509. 3:
  4510. /abc/
  4511. *** Failers
  4512. No match
  4513. b
  4514. No match
  4515. /a*/
  4516. /([abc])*d/
  4517. abbbcd
  4518. 0: abbbcd
  4519. /([abc])*bcd/
  4520. abcd
  4521. 0: abcd
  4522. /a|b|c|d|e/
  4523. e
  4524. 0: e
  4525. /(a|b|c|d|e)f/
  4526. ef
  4527. 0: ef
  4528. /abcd*efg/
  4529. abcdefg
  4530. 0: abcdefg
  4531. /ab*/
  4532. xabyabbbz
  4533. 0: ab
  4534. 1: a
  4535. xayabbbz
  4536. 0: a
  4537. /(ab|cd)e/
  4538. abcde
  4539. 0: cde
  4540. /[abhgefdc]ij/
  4541. hij
  4542. 0: hij
  4543. /^(ab|cd)e/
  4544. /(abc|)ef/
  4545. abcdef
  4546. 0: ef
  4547. /(a|b)c*d/
  4548. abcd
  4549. 0: bcd
  4550. /(ab|ab*)bc/
  4551. abc
  4552. 0: abc
  4553. /a([bc]*)c*/
  4554. abc
  4555. 0: abc
  4556. 1: ab
  4557. 2: a
  4558. /a([bc]*)(c*d)/
  4559. abcd
  4560. 0: abcd
  4561. /a([bc]+)(c*d)/
  4562. abcd
  4563. 0: abcd
  4564. /a([bc]*)(c+d)/
  4565. abcd
  4566. 0: abcd
  4567. /a[bcd]*dcdcde/
  4568. adcdcde
  4569. 0: adcdcde
  4570. /a[bcd]+dcdcde/
  4571. *** Failers
  4572. No match
  4573. abcde
  4574. No match
  4575. adcdcde
  4576. No match
  4577. /(ab|a)b*c/
  4578. abc
  4579. 0: abc
  4580. /((a)(b)c)(d)/
  4581. abcd
  4582. 0: abcd
  4583. /[a-zA-Z_][a-zA-Z0-9_]*/
  4584. alpha
  4585. 0: alpha
  4586. 1: alph
  4587. 2: alp
  4588. 3: al
  4589. 4: a
  4590. /^a(bc+|b[eh])g|.h$/
  4591. abh
  4592. 0: bh
  4593. /(bc+d$|ef*g.|h?i(j|k))/
  4594. effgz
  4595. 0: effgz
  4596. ij
  4597. 0: ij
  4598. reffgz
  4599. 0: effgz
  4600. *** Failers
  4601. No match
  4602. effg
  4603. No match
  4604. bcdd
  4605. No match
  4606. /((((((((((a))))))))))/
  4607. a
  4608. 0: a
  4609. /(((((((((a)))))))))/
  4610. a
  4611. 0: a
  4612. /multiple words of text/
  4613. *** Failers
  4614. No match
  4615. aa
  4616. No match
  4617. uh-uh
  4618. No match
  4619. /multiple words/
  4620. multiple words, yeah
  4621. 0: multiple words
  4622. /(.*)c(.*)/
  4623. abcde
  4624. 0: abcde
  4625. 1: abcd
  4626. 2: abc
  4627. /\((.*), (.*)\)/
  4628. (a, b)
  4629. 0: (a, b)
  4630. /[k]/
  4631. /abcd/
  4632. abcd
  4633. 0: abcd
  4634. /a(bc)d/
  4635. abcd
  4636. 0: abcd
  4637. /a[-]?c/
  4638. ac
  4639. 0: ac
  4640. /abc/i
  4641. ABC
  4642. 0: ABC
  4643. XABCY
  4644. 0: ABC
  4645. ABABC
  4646. 0: ABC
  4647. *** Failers
  4648. No match
  4649. aaxabxbaxbbx
  4650. No match
  4651. XBC
  4652. No match
  4653. AXC
  4654. No match
  4655. ABX
  4656. No match
  4657. /ab*c/i
  4658. ABC
  4659. 0: ABC
  4660. /ab*bc/i
  4661. ABC
  4662. 0: ABC
  4663. ABBC
  4664. 0: ABBC
  4665. /ab*?bc/i
  4666. ABBBBC
  4667. 0: ABBBBC
  4668. /ab{0,}?bc/i
  4669. ABBBBC
  4670. 0: ABBBBC
  4671. /ab+?bc/i
  4672. ABBC
  4673. 0: ABBC
  4674. /ab+bc/i
  4675. *** Failers
  4676. No match
  4677. ABC
  4678. No match
  4679. ABQ
  4680. No match
  4681. /ab{1,}bc/i
  4682. /ab+bc/i
  4683. ABBBBC
  4684. 0: ABBBBC
  4685. /ab{1,}?bc/i
  4686. ABBBBC
  4687. 0: ABBBBC
  4688. /ab{1,3}?bc/i
  4689. ABBBBC
  4690. 0: ABBBBC
  4691. /ab{3,4}?bc/i
  4692. ABBBBC
  4693. 0: ABBBBC
  4694. /ab{4,5}?bc/i
  4695. *** Failers
  4696. No match
  4697. ABQ
  4698. No match
  4699. ABBBBC
  4700. No match
  4701. /ab??bc/i
  4702. ABBC
  4703. 0: ABBC
  4704. ABC
  4705. 0: ABC
  4706. /ab{0,1}?bc/i
  4707. ABC
  4708. 0: ABC
  4709. /ab??bc/i
  4710. /ab??c/i
  4711. ABC
  4712. 0: ABC
  4713. /ab{0,1}?c/i
  4714. ABC
  4715. 0: ABC
  4716. /^abc$/i
  4717. ABC
  4718. 0: ABC
  4719. *** Failers
  4720. No match
  4721. ABBBBC
  4722. No match
  4723. ABCC
  4724. No match
  4725. /^abc/i
  4726. ABCC
  4727. 0: ABC
  4728. /^abc$/i
  4729. /abc$/i
  4730. AABC
  4731. 0: ABC
  4732. /^/i
  4733. ABC
  4734. 0:
  4735. /$/i
  4736. ABC
  4737. 0:
  4738. /a.c/i
  4739. ABC
  4740. 0: ABC
  4741. AXC
  4742. 0: AXC
  4743. /a.*?c/i
  4744. AXYZC
  4745. 0: AXYZC
  4746. /a.*c/i
  4747. *** Failers
  4748. No match
  4749. AABC
  4750. 0: AABC
  4751. AXYZD
  4752. No match
  4753. /a[bc]d/i
  4754. ABD
  4755. 0: ABD
  4756. /a[b-d]e/i
  4757. ACE
  4758. 0: ACE
  4759. *** Failers
  4760. No match
  4761. ABC
  4762. No match
  4763. ABD
  4764. No match
  4765. /a[b-d]/i
  4766. AAC
  4767. 0: AC
  4768. /a[-b]/i
  4769. A-
  4770. 0: A-
  4771. /a[b-]/i
  4772. A-
  4773. 0: A-
  4774. /a]/i
  4775. A]
  4776. 0: A]
  4777. /a[]]b/i
  4778. A]B
  4779. 0: A]B
  4780. /a[^bc]d/i
  4781. AED
  4782. 0: AED
  4783. /a[^-b]c/i
  4784. ADC
  4785. 0: ADC
  4786. *** Failers
  4787. No match
  4788. ABD
  4789. No match
  4790. A-C
  4791. No match
  4792. /a[^]b]c/i
  4793. ADC
  4794. 0: ADC
  4795. /ab|cd/i
  4796. ABC
  4797. 0: AB
  4798. ABCD
  4799. 0: AB
  4800. /()ef/i
  4801. DEF
  4802. 0: EF
  4803. /$b/i
  4804. *** Failers
  4805. No match
  4806. A]C
  4807. No match
  4808. B
  4809. No match
  4810. /a\(b/i
  4811. A(B
  4812. 0: A(B
  4813. /a\(*b/i
  4814. AB
  4815. 0: AB
  4816. A((B
  4817. 0: A((B
  4818. /a\\b/i
  4819. A\B
  4820. No match
  4821. /((a))/i
  4822. ABC
  4823. 0: A
  4824. /(a)b(c)/i
  4825. ABC
  4826. 0: ABC
  4827. /a+b+c/i
  4828. AABBABC
  4829. 0: ABC
  4830. /a{1,}b{1,}c/i
  4831. AABBABC
  4832. 0: ABC
  4833. /a.+?c/i
  4834. ABCABC
  4835. 0: ABCABC
  4836. 1: ABC
  4837. /a.*?c/i
  4838. ABCABC
  4839. 0: ABCABC
  4840. 1: ABC
  4841. /a.{0,5}?c/i
  4842. ABCABC
  4843. 0: ABCABC
  4844. 1: ABC
  4845. /(a+|b)*/i
  4846. AB
  4847. 0: AB
  4848. 1: A
  4849. 2:
  4850. /(a+|b){0,}/i
  4851. AB
  4852. 0: AB
  4853. 1: A
  4854. 2:
  4855. /(a+|b)+/i
  4856. AB
  4857. 0: AB
  4858. 1: A
  4859. /(a+|b){1,}/i
  4860. AB
  4861. 0: AB
  4862. 1: A
  4863. /(a+|b)?/i
  4864. AB
  4865. 0: A
  4866. 1:
  4867. /(a+|b){0,1}/i
  4868. AB
  4869. 0: A
  4870. 1:
  4871. /(a+|b){0,1}?/i
  4872. AB
  4873. 0: A
  4874. 1:
  4875. /[^ab]*/i
  4876. CDE
  4877. 0: CDE
  4878. 1: CD
  4879. 2: C
  4880. 3:
  4881. /abc/i
  4882. /a*/i
  4883. /([abc])*d/i
  4884. ABBBCD
  4885. 0: ABBBCD
  4886. /([abc])*bcd/i
  4887. ABCD
  4888. 0: ABCD
  4889. /a|b|c|d|e/i
  4890. E
  4891. 0: E
  4892. /(a|b|c|d|e)f/i
  4893. EF
  4894. 0: EF
  4895. /abcd*efg/i
  4896. ABCDEFG
  4897. 0: ABCDEFG
  4898. /ab*/i
  4899. XABYABBBZ
  4900. 0: AB
  4901. 1: A
  4902. XAYABBBZ
  4903. 0: A
  4904. /(ab|cd)e/i
  4905. ABCDE
  4906. 0: CDE
  4907. /[abhgefdc]ij/i
  4908. HIJ
  4909. 0: HIJ
  4910. /^(ab|cd)e/i
  4911. ABCDE
  4912. No match
  4913. /(abc|)ef/i
  4914. ABCDEF
  4915. 0: EF
  4916. /(a|b)c*d/i
  4917. ABCD
  4918. 0: BCD
  4919. /(ab|ab*)bc/i
  4920. ABC
  4921. 0: ABC
  4922. /a([bc]*)c*/i
  4923. ABC
  4924. 0: ABC
  4925. 1: AB
  4926. 2: A
  4927. /a([bc]*)(c*d)/i
  4928. ABCD
  4929. 0: ABCD
  4930. /a([bc]+)(c*d)/i
  4931. ABCD
  4932. 0: ABCD
  4933. /a([bc]*)(c+d)/i
  4934. ABCD
  4935. 0: ABCD
  4936. /a[bcd]*dcdcde/i
  4937. ADCDCDE
  4938. 0: ADCDCDE
  4939. /a[bcd]+dcdcde/i
  4940. /(ab|a)b*c/i
  4941. ABC
  4942. 0: ABC
  4943. /((a)(b)c)(d)/i
  4944. ABCD
  4945. 0: ABCD
  4946. /[a-zA-Z_][a-zA-Z0-9_]*/i
  4947. ALPHA
  4948. 0: ALPHA
  4949. 1: ALPH
  4950. 2: ALP
  4951. 3: AL
  4952. 4: A
  4953. /^a(bc+|b[eh])g|.h$/i
  4954. ABH
  4955. 0: BH
  4956. /(bc+d$|ef*g.|h?i(j|k))/i
  4957. EFFGZ
  4958. 0: EFFGZ
  4959. IJ
  4960. 0: IJ
  4961. REFFGZ
  4962. 0: EFFGZ
  4963. *** Failers
  4964. No match
  4965. ADCDCDE
  4966. No match
  4967. EFFG
  4968. No match
  4969. BCDD
  4970. No match
  4971. /((((((((((a))))))))))/i
  4972. A
  4973. 0: A
  4974. /(((((((((a)))))))))/i
  4975. A
  4976. 0: A
  4977. /(?:(?:(?:(?:(?:(?:(?:(?:(?:(a))))))))))/i
  4978. A
  4979. 0: A
  4980. /(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))/i
  4981. C
  4982. 0: C
  4983. /multiple words of text/i
  4984. *** Failers
  4985. No match
  4986. AA
  4987. No match
  4988. UH-UH
  4989. No match
  4990. /multiple words/i
  4991. MULTIPLE WORDS, YEAH
  4992. 0: MULTIPLE WORDS
  4993. /(.*)c(.*)/i
  4994. ABCDE
  4995. 0: ABCDE
  4996. 1: ABCD
  4997. 2: ABC
  4998. /\((.*), (.*)\)/i
  4999. (A, B)
  5000. 0: (A, B)
  5001. /[k]/i
  5002. /abcd/i
  5003. ABCD
  5004. 0: ABCD
  5005. /a(bc)d/i
  5006. ABCD
  5007. 0: ABCD
  5008. /a[-]?c/i
  5009. AC
  5010. 0: AC
  5011. /a(?!b)./
  5012. abad
  5013. 0: ad
  5014. /a(?=d)./
  5015. abad
  5016. 0: ad
  5017. /a(?=c|d)./
  5018. abad
  5019. 0: ad
  5020. /a(?:b|c|d)(.)/
  5021. ace
  5022. 0: ace
  5023. /a(?:b|c|d)*(.)/
  5024. ace
  5025. 0: ace
  5026. 1: ac
  5027. /a(?:b|c|d)+?(.)/
  5028. ace
  5029. 0: ace
  5030. acdbcdbe
  5031. 0: acdbcdbe
  5032. 1: acdbcdb
  5033. 2: acdbcd
  5034. 3: acdbc
  5035. 4: acdb
  5036. 5: acd
  5037. /a(?:b|c|d)+(.)/
  5038. acdbcdbe
  5039. 0: acdbcdbe
  5040. 1: acdbcdb
  5041. 2: acdbcd
  5042. 3: acdbc
  5043. 4: acdb
  5044. 5: acd
  5045. /a(?:b|c|d){2}(.)/
  5046. acdbcdbe
  5047. 0: acdb
  5048. /a(?:b|c|d){4,5}(.)/
  5049. acdbcdbe
  5050. 0: acdbcdb
  5051. 1: acdbcd
  5052. /a(?:b|c|d){4,5}?(.)/
  5053. acdbcdbe
  5054. 0: acdbcdb
  5055. 1: acdbcd
  5056. /((foo)|(bar))*/
  5057. foobar
  5058. 0: foobar
  5059. 1: foo
  5060. 2:
  5061. /a(?:b|c|d){6,7}(.)/
  5062. acdbcdbe
  5063. 0: acdbcdbe
  5064. /a(?:b|c|d){6,7}?(.)/
  5065. acdbcdbe
  5066. 0: acdbcdbe
  5067. /a(?:b|c|d){5,6}(.)/
  5068. acdbcdbe
  5069. 0: acdbcdbe
  5070. 1: acdbcdb
  5071. /a(?:b|c|d){5,6}?(.)/
  5072. acdbcdbe
  5073. 0: acdbcdbe
  5074. 1: acdbcdb
  5075. /a(?:b|c|d){5,7}(.)/
  5076. acdbcdbe
  5077. 0: acdbcdbe
  5078. 1: acdbcdb
  5079. /a(?:b|c|d){5,7}?(.)/
  5080. acdbcdbe
  5081. 0: acdbcdbe
  5082. 1: acdbcdb
  5083. /a(?:b|(c|e){1,2}?|d)+?(.)/
  5084. ace
  5085. 0: ace
  5086. /^(.+)?B/
  5087. AB
  5088. 0: AB
  5089. /^([^a-z])|(\^)$/
  5090. .
  5091. 0: .
  5092. /^[<>]&/
  5093. <&OUT
  5094. 0: <&
  5095. /(?:(f)(o)(o)|(b)(a)(r))*/
  5096. foobar
  5097. 0: foobar
  5098. 1: foo
  5099. 2:
  5100. /(?<=a)b/
  5101. ab
  5102. 0: b
  5103. *** Failers
  5104. No match
  5105. cb
  5106. No match
  5107. b
  5108. No match
  5109. /(?<!c)b/
  5110. ab
  5111. 0: b
  5112. b
  5113. 0: b
  5114. b
  5115. 0: b
  5116. /(?:..)*a/
  5117. aba
  5118. 0: aba
  5119. 1: a
  5120. /(?:..)*?a/
  5121. aba
  5122. 0: aba
  5123. 1: a
  5124. /^(){3,5}/
  5125. abc
  5126. 0:
  5127. /^(a+)*ax/
  5128. aax
  5129. 0: aax
  5130. /^((a|b)+)*ax/
  5131. aax
  5132. 0: aax
  5133. /^((a|bc)+)*ax/
  5134. aax
  5135. 0: aax
  5136. /(a|x)*ab/
  5137. cab
  5138. 0: ab
  5139. /(a)*ab/
  5140. cab
  5141. 0: ab
  5142. /(?:(?i)a)b/
  5143. ab
  5144. 0: ab
  5145. /((?i)a)b/
  5146. ab
  5147. 0: ab
  5148. /(?:(?i)a)b/
  5149. Ab
  5150. 0: Ab
  5151. /((?i)a)b/
  5152. Ab
  5153. 0: Ab
  5154. /(?:(?i)a)b/
  5155. *** Failers
  5156. No match
  5157. cb
  5158. No match
  5159. aB
  5160. No match
  5161. /((?i)a)b/
  5162. /(?i:a)b/
  5163. ab
  5164. 0: ab
  5165. /((?i:a))b/
  5166. ab
  5167. 0: ab
  5168. /(?i:a)b/
  5169. Ab
  5170. 0: Ab
  5171. /((?i:a))b/
  5172. Ab
  5173. 0: Ab
  5174. /(?i:a)b/
  5175. *** Failers
  5176. No match
  5177. aB
  5178. No match
  5179. aB
  5180. No match
  5181. /((?i:a))b/
  5182. /(?:(?-i)a)b/i
  5183. ab
  5184. 0: ab
  5185. /((?-i)a)b/i
  5186. ab
  5187. 0: ab
  5188. /(?:(?-i)a)b/i
  5189. aB
  5190. 0: aB
  5191. /((?-i)a)b/i
  5192. aB
  5193. 0: aB
  5194. /(?:(?-i)a)b/i
  5195. *** Failers
  5196. No match
  5197. aB
  5198. 0: aB
  5199. Ab
  5200. No match
  5201. /((?-i)a)b/i
  5202. /(?:(?-i)a)b/i
  5203. aB
  5204. 0: aB
  5205. /((?-i)a)b/i
  5206. aB
  5207. 0: aB
  5208. /(?:(?-i)a)b/i
  5209. *** Failers
  5210. No match
  5211. Ab
  5212. No match
  5213. AB
  5214. No match
  5215. /((?-i)a)b/i
  5216. /(?-i:a)b/i
  5217. ab
  5218. 0: ab
  5219. /((?-i:a))b/i
  5220. ab
  5221. 0: ab
  5222. /(?-i:a)b/i
  5223. aB
  5224. 0: aB
  5225. /((?-i:a))b/i
  5226. aB
  5227. 0: aB
  5228. /(?-i:a)b/i
  5229. *** Failers
  5230. No match
  5231. AB
  5232. No match
  5233. Ab
  5234. No match
  5235. /((?-i:a))b/i
  5236. /(?-i:a)b/i
  5237. aB
  5238. 0: aB
  5239. /((?-i:a))b/i
  5240. aB
  5241. 0: aB
  5242. /(?-i:a)b/i
  5243. *** Failers
  5244. No match
  5245. Ab
  5246. No match
  5247. AB
  5248. No match
  5249. /((?-i:a))b/i
  5250. /((?-i:a.))b/i
  5251. *** Failers
  5252. No match
  5253. AB
  5254. No match
  5255. a\nB
  5256. No match
  5257. /((?s-i:a.))b/i
  5258. a\nB
  5259. 0: a\x0aB
  5260. /(?:c|d)(?:)(?:a(?:)(?:b)(?:b(?:))(?:b(?:)(?:b)))/
  5261. cabbbb
  5262. 0: cabbbb
  5263. /(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))/
  5264. caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
  5265. 0: caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
  5266. /foo\w*\d{4}baz/
  5267. foobar1234baz
  5268. 0: foobar1234baz
  5269. /x(~~)*(?:(?:F)?)?/
  5270. x~~
  5271. 0: x~~
  5272. 1: x
  5273. /^a(?#xxx){3}c/
  5274. aaac
  5275. 0: aaac
  5276. /^a (?#xxx) (?#yyy) {3}c/x
  5277. aaac
  5278. 0: aaac
  5279. /(?<![cd])b/
  5280. *** Failers
  5281. No match
  5282. B\nB
  5283. No match
  5284. dbcb
  5285. No match
  5286. /(?<![cd])[ab]/
  5287. dbaacb
  5288. 0: a
  5289. /(?<!(c|d))b/
  5290. /(?<!(c|d))[ab]/
  5291. dbaacb
  5292. 0: a
  5293. /(?<!cd)[ab]/
  5294. cdaccb
  5295. 0: b
  5296. /^(?:a?b?)*$/
  5297. *** Failers
  5298. No match
  5299. dbcb
  5300. No match
  5301. a--
  5302. No match
  5303. /((?s)^a(.))((?m)^b$)/
  5304. a\nb\nc\n
  5305. 0: a\x0ab
  5306. /((?m)^b$)/
  5307. a\nb\nc\n
  5308. 0: b
  5309. /(?m)^b/
  5310. a\nb\n
  5311. 0: b
  5312. /(?m)^(b)/
  5313. a\nb\n
  5314. 0: b
  5315. /((?m)^b)/
  5316. a\nb\n
  5317. 0: b
  5318. /\n((?m)^b)/
  5319. a\nb\n
  5320. 0: \x0ab
  5321. /((?s).)c(?!.)/
  5322. a\nb\nc\n
  5323. 0: \x0ac
  5324. a\nb\nc\n
  5325. 0: \x0ac
  5326. /((?s)b.)c(?!.)/
  5327. a\nb\nc\n
  5328. 0: b\x0ac
  5329. a\nb\nc\n
  5330. 0: b\x0ac
  5331. /^b/
  5332. /()^b/
  5333. *** Failers
  5334. No match
  5335. a\nb\nc\n
  5336. No match
  5337. a\nb\nc\n
  5338. No match
  5339. /((?m)^b)/
  5340. a\nb\nc\n
  5341. 0: b
  5342. /(?(?!a)a|b)/
  5343. /(?(?!a)b|a)/
  5344. a
  5345. 0: a
  5346. /(?(?=a)b|a)/
  5347. *** Failers
  5348. No match
  5349. a
  5350. No match
  5351. a
  5352. No match
  5353. /(?(?=a)a|b)/
  5354. a
  5355. 0: a
  5356. /(\w+:)+/
  5357. one:
  5358. 0: one:
  5359. /$(?<=^(a))/
  5360. a
  5361. 0:
  5362. /([\w:]+::)?(\w+)$/
  5363. abcd
  5364. 0: abcd
  5365. xy:z:::abcd
  5366. 0: xy:z:::abcd
  5367. /^[^bcd]*(c+)/
  5368. aexycd
  5369. 0: aexyc
  5370. /(a*)b+/
  5371. caab
  5372. 0: aab
  5373. /([\w:]+::)?(\w+)$/
  5374. abcd
  5375. 0: abcd
  5376. xy:z:::abcd
  5377. 0: xy:z:::abcd
  5378. *** Failers
  5379. 0: Failers
  5380. abcd:
  5381. No match
  5382. abcd:
  5383. No match
  5384. /^[^bcd]*(c+)/
  5385. aexycd
  5386. 0: aexyc
  5387. /(>a+)ab/
  5388. /(?>a+)b/
  5389. aaab
  5390. 0: aaab
  5391. /([[:]+)/
  5392. a:[b]:
  5393. 0: :[
  5394. 1: :
  5395. /([[=]+)/
  5396. a=[b]=
  5397. 0: =[
  5398. 1: =
  5399. /([[.]+)/
  5400. a.[b].
  5401. 0: .[
  5402. 1: .
  5403. /((?>a+)b)/
  5404. aaab
  5405. 0: aaab
  5406. /(?>(a+))b/
  5407. aaab
  5408. 0: aaab
  5409. /((?>[^()]+)|\([^()]*\))+/
  5410. ((abc(ade)ufh()()x
  5411. 0: abc(ade)ufh()()x
  5412. 1: abc(ade)ufh()()
  5413. 2: abc(ade)ufh()
  5414. 3: abc(ade)ufh
  5415. 4: abc(ade)
  5416. 5: abc
  5417. /a\Z/
  5418. *** Failers
  5419. No match
  5420. aaab
  5421. No match
  5422. a\nb\n
  5423. No match
  5424. /b\Z/
  5425. a\nb\n
  5426. 0: b
  5427. /b\z/
  5428. /b\Z/
  5429. a\nb
  5430. 0: b
  5431. /b\z/
  5432. a\nb
  5433. 0: b
  5434. *** Failers
  5435. No match
  5436. /(?>.*)(?<=(abcd|wxyz))/
  5437. alphabetabcd
  5438. 0: alphabetabcd
  5439. endingwxyz
  5440. 0: endingwxyz
  5441. *** Failers
  5442. No match
  5443. a rather long string that doesn't end with one of them
  5444. No match
  5445. /word (?>(?:(?!otherword)[a-zA-Z0-9]+ ){0,30})otherword/
  5446. word cat dog elephant mussel cow horse canary baboon snake shark otherword
  5447. 0: word cat dog elephant mussel cow horse canary baboon snake shark otherword
  5448. word cat dog elephant mussel cow horse canary baboon snake shark
  5449. No match
  5450. /word (?>[a-zA-Z0-9]+ ){0,30}otherword/
  5451. word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope
  5452. No match
  5453. /(?<=\d{3}(?!999))foo/
  5454. 999foo
  5455. 0: foo
  5456. 123999foo
  5457. 0: foo
  5458. *** Failers
  5459. No match
  5460. 123abcfoo
  5461. No match
  5462. /(?<=(?!...999)\d{3})foo/
  5463. 999foo
  5464. 0: foo
  5465. 123999foo
  5466. 0: foo
  5467. *** Failers
  5468. No match
  5469. 123abcfoo
  5470. No match
  5471. /(?<=\d{3}(?!999)...)foo/
  5472. 123abcfoo
  5473. 0: foo
  5474. 123456foo
  5475. 0: foo
  5476. *** Failers
  5477. No match
  5478. 123999foo
  5479. No match
  5480. /(?<=\d{3}...)(?<!999)foo/
  5481. 123abcfoo
  5482. 0: foo
  5483. 123456foo
  5484. 0: foo
  5485. *** Failers
  5486. No match
  5487. 123999foo
  5488. No match
  5489. /((Z)+|A)*/
  5490. ZABCDEFG
  5491. 0: ZA
  5492. 1: Z
  5493. 2:
  5494. /(Z()|A)*/
  5495. ZABCDEFG
  5496. 0: ZA
  5497. 1: Z
  5498. 2:
  5499. /(Z(())|A)*/
  5500. ZABCDEFG
  5501. 0: ZA
  5502. 1: Z
  5503. 2:
  5504. /((?>Z)+|A)*/
  5505. ZABCDEFG
  5506. 0: ZA
  5507. 1: Z
  5508. 2:
  5509. /((?>)+|A)*/
  5510. ZABCDEFG
  5511. 0:
  5512. /a*/g
  5513. abbab
  5514. 0: a
  5515. 1:
  5516. 0:
  5517. 0:
  5518. 0: a
  5519. 1:
  5520. 0:
  5521. 0:
  5522. /^[a-\d]/
  5523. abcde
  5524. 0: a
  5525. -things
  5526. 0: -
  5527. 0digit
  5528. 0: 0
  5529. *** Failers
  5530. No match
  5531. bcdef
  5532. No match
  5533. /^[\d-a]/
  5534. abcde
  5535. 0: a
  5536. -things
  5537. 0: -
  5538. 0digit
  5539. 0: 0
  5540. *** Failers
  5541. No match
  5542. bcdef
  5543. No match
  5544. /[[:space:]]+/
  5545. > \x09\x0a\x0c\x0d\x0b<
  5546. 0: \x09\x0a\x0c\x0d\x0b
  5547. 1: \x09\x0a\x0c\x0d
  5548. 2: \x09\x0a\x0c
  5549. 3: \x09\x0a
  5550. 4: \x09
  5551. 5:
  5552. /[[:blank:]]+/
  5553. > \x09\x0a\x0c\x0d\x0b<
  5554. 0: \x09
  5555. 1:
  5556. /[\s]+/
  5557. > \x09\x0a\x0c\x0d\x0b<
  5558. 0: \x09\x0a\x0c\x0d
  5559. 1: \x09\x0a\x0c
  5560. 2: \x09\x0a
  5561. 3: \x09
  5562. 4:
  5563. /\s+/
  5564. > \x09\x0a\x0c\x0d\x0b<
  5565. 0: \x09\x0a\x0c\x0d
  5566. 1: \x09\x0a\x0c
  5567. 2: \x09\x0a
  5568. 3: \x09
  5569. 4:
  5570. /a b/x
  5571. ab
  5572. No match
  5573. /(?!\A)x/m
  5574. a\nxb\n
  5575. 0: x
  5576. /(?!^)x/m
  5577. a\nxb\n
  5578. No match
  5579. /abc\Qabc\Eabc/
  5580. abcabcabc
  5581. 0: abcabcabc
  5582. /abc\Q(*+|\Eabc/
  5583. abc(*+|abc
  5584. 0: abc(*+|abc
  5585. / abc\Q abc\Eabc/x
  5586. abc abcabc
  5587. 0: abc abcabc
  5588. *** Failers
  5589. No match
  5590. abcabcabc
  5591. No match
  5592. /abc#comment
  5593. \Q#not comment
  5594. literal\E/x
  5595. abc#not comment\n literal
  5596. 0: abc#not comment\x0a literal
  5597. /abc#comment
  5598. \Q#not comment
  5599. literal/x
  5600. abc#not comment\n literal
  5601. 0: abc#not comment\x0a literal
  5602. /abc#comment
  5603. \Q#not comment
  5604. literal\E #more comment
  5605. /x
  5606. abc#not comment\n literal
  5607. 0: abc#not comment\x0a literal
  5608. /abc#comment
  5609. \Q#not comment
  5610. literal\E #more comment/x
  5611. abc#not comment\n literal
  5612. 0: abc#not comment\x0a literal
  5613. /\Qabc\$xyz\E/
  5614. abc\\\$xyz
  5615. 0: abc\$xyz
  5616. /\Qabc\E\$\Qxyz\E/
  5617. abc\$xyz
  5618. 0: abc$xyz
  5619. /\Gabc/
  5620. abc
  5621. 0: abc
  5622. *** Failers
  5623. No match
  5624. xyzabc
  5625. No match
  5626. /\Gabc./g
  5627. abc1abc2xyzabc3
  5628. 0: abc1
  5629. 0: abc2
  5630. /abc./g
  5631. abc1abc2xyzabc3
  5632. 0: abc1
  5633. 0: abc2
  5634. 0: abc3
  5635. /a(?x: b c )d/
  5636. XabcdY
  5637. 0: abcd
  5638. *** Failers
  5639. No match
  5640. Xa b c d Y
  5641. No match
  5642. /((?x)x y z | a b c)/
  5643. XabcY
  5644. 0: abc
  5645. AxyzB
  5646. 0: xyz
  5647. /(?i)AB(?-i)C/
  5648. XabCY
  5649. 0: abC
  5650. *** Failers
  5651. No match
  5652. XabcY
  5653. No match
  5654. /((?i)AB(?-i)C|D)E/
  5655. abCE
  5656. 0: abCE
  5657. DE
  5658. 0: DE
  5659. *** Failers
  5660. No match
  5661. abcE
  5662. No match
  5663. abCe
  5664. No match
  5665. dE
  5666. No match
  5667. De
  5668. No match
  5669. /[z\Qa-d]\E]/
  5670. z
  5671. 0: z
  5672. a
  5673. 0: a
  5674. -
  5675. 0: -
  5676. d
  5677. 0: d
  5678. ]
  5679. 0: ]
  5680. *** Failers
  5681. 0: a
  5682. b
  5683. No match
  5684. /[\z\C]/
  5685. z
  5686. 0: z
  5687. C
  5688. 0: C
  5689. /\M/
  5690. M
  5691. 0: M
  5692. /(a+)*b/
  5693. aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  5694. No match
  5695. /(?i)reg(?:ul(?:[]|ae)r|ex)/
  5696. REGular
  5697. 0: REGular
  5698. regulaer
  5699. 0: regulaer
  5700. Regex
  5701. 0: Regex
  5702. regulдr
  5703. 0: regul\xe4r
  5704. /жед[а-ј-я]+/
  5705. жеда
  5706. 0: \xc5\xe6\xe5\xe4\xe0
  5707. жед
  5708. 0: \xc5\xe6\xe5\xe4\xff
  5709. жедј
  5710. 0: \xc5\xe6\xe5\xe4\xc0
  5711. жедя
  5712. 0: \xc5\xe6\xe5\xe4\xdf
  5713. /(?<=Z)X./
  5714. \x84XAZXB
  5715. 0: XB
  5716. /^(?(2)a|(1)(2))+$/
  5717. 123a
  5718. Error -17
  5719. /(?<=a|bbbb)c/
  5720. ac
  5721. 0: c
  5722. bbbbc
  5723. 0: c
  5724. /abc/>testsavedregex
  5725. Compiled regex written to testsavedregex
  5726. <testsavedregex
  5727. Compiled regex loaded from testsavedregex
  5728. No study data
  5729. abc
  5730. 0: abc
  5731. *** Failers
  5732. No match
  5733. bca
  5734. No match
  5735. /abc/F>testsavedregex
  5736. Compiled regex written to testsavedregex
  5737. <testsavedregex
  5738. Compiled regex (byte-inverted) loaded from testsavedregex
  5739. No study data
  5740. abc
  5741. 0: abc
  5742. *** Failers
  5743. No match
  5744. bca
  5745. No match
  5746. /(a|b)/S>testsavedregex
  5747. Compiled regex written to testsavedregex
  5748. Study data written to testsavedregex
  5749. <testsavedregex
  5750. Compiled regex loaded from testsavedregex
  5751. Study data loaded from testsavedregex
  5752. abc
  5753. 0: a
  5754. *** Failers
  5755. 0: a
  5756. def
  5757. No match
  5758. /(a|b)/SF>testsavedregex
  5759. Compiled regex written to testsavedregex
  5760. Study data written to testsavedregex
  5761. <testsavedregex
  5762. Compiled regex (byte-inverted) loaded from testsavedregex
  5763. Study data loaded from testsavedregex
  5764. abc
  5765. 0: a
  5766. *** Failers
  5767. 0: a
  5768. def
  5769. No match
  5770. /line\nbreak/
  5771. this is a line\nbreak
  5772. 0: line\x0abreak
  5773. line one\nthis is a line\nbreak in the second line
  5774. 0: line\x0abreak
  5775. /line\nbreak/f
  5776. this is a line\nbreak
  5777. 0: line\x0abreak
  5778. ** Failers
  5779. No match
  5780. line one\nthis is a line\nbreak in the second line
  5781. No match
  5782. /line\nbreak/mf
  5783. this is a line\nbreak
  5784. 0: line\x0abreak
  5785. ** Failers
  5786. No match
  5787. line one\nthis is a line\nbreak in the second line
  5788. No match
  5789. /1234/
  5790. 123\P
  5791. Partial match: 123
  5792. a4\P\R
  5793. No match
  5794. /1234/
  5795. 123\P
  5796. Partial match: 123
  5797. 4\P\R
  5798. 0: 4
  5799. /^/mg
  5800. a\nb\nc\n
  5801. 0:
  5802. 0:
  5803. 0:
  5804. \
  5805. 0:
  5806. /(?<=C\n)^/mg
  5807. A\nC\nC\n
  5808. 0:
  5809. /(?s)A?B/
  5810. AB
  5811. 0: AB
  5812. aB
  5813. 0: B
  5814. /(?s)A*B/
  5815. AB
  5816. 0: AB
  5817. aB
  5818. 0: B
  5819. /(?m)A?B/
  5820. AB
  5821. 0: AB
  5822. aB
  5823. 0: B
  5824. /(?m)A*B/
  5825. AB
  5826. 0: AB
  5827. aB
  5828. 0: B
  5829. /Content-Type\x3A[^\r\n]{6,}/
  5830. Content-Type:xxxxxyyy
  5831. 0: Content-Type:xxxxxyyy
  5832. 1: Content-Type:xxxxxyy
  5833. 2: Content-Type:xxxxxy
  5834. /Content-Type\x3A[^\r\n]{6,}z/
  5835. Content-Type:xxxxxyyyz
  5836. 0: Content-Type:xxxxxyyyz
  5837. /Content-Type\x3A[^a]{6,}/
  5838. Content-Type:xxxyyy
  5839. 0: Content-Type:xxxyyy
  5840. /Content-Type\x3A[^a]{6,}z/
  5841. Content-Type:xxxyyyz
  5842. 0: Content-Type:xxxyyyz
  5843. /^abc/m
  5844. xyz\nabc
  5845. 0: abc
  5846. xyz\nabc\<lf>
  5847. 0: abc
  5848. xyz\r\nabc\<lf>
  5849. 0: abc
  5850. xyz\rabc\<cr>
  5851. 0: abc
  5852. xyz\r\nabc\<crlf>
  5853. 0: abc
  5854. ** Failers
  5855. No match
  5856. xyz\nabc\<cr>
  5857. No match
  5858. xyz\r\nabc\<cr>
  5859. No match
  5860. xyz\nabc\<crlf>
  5861. No match
  5862. xyz\rabc\<crlf>
  5863. No match
  5864. xyz\rabc\<lf>
  5865. No match
  5866. /abc$/m<lf>
  5867. xyzabc
  5868. 0: abc
  5869. xyzabc\n
  5870. 0: abc
  5871. xyzabc\npqr
  5872. 0: abc
  5873. xyzabc\r\<cr>
  5874. 0: abc
  5875. xyzabc\rpqr\<cr>
  5876. 0: abc
  5877. xyzabc\r\n\<crlf>
  5878. 0: abc
  5879. xyzabc\r\npqr\<crlf>
  5880. 0: abc
  5881. ** Failers
  5882. No match
  5883. xyzabc\r
  5884. No match
  5885. xyzabc\rpqr
  5886. No match
  5887. xyzabc\r\n
  5888. No match
  5889. xyzabc\r\npqr
  5890. No match
  5891. /^abc/m<cr>
  5892. xyz\rabcdef
  5893. 0: abc
  5894. xyz\nabcdef\<lf>
  5895. 0: abc
  5896. ** Failers
  5897. No match
  5898. xyz\nabcdef
  5899. No match
  5900. /^abc/m<lf>
  5901. xyz\nabcdef
  5902. 0: abc
  5903. xyz\rabcdef\<cr>
  5904. 0: abc
  5905. ** Failers
  5906. No match
  5907. xyz\rabcdef
  5908. No match
  5909. /^abc/m<crlf>
  5910. xyz\r\nabcdef
  5911. 0: abc
  5912. xyz\rabcdef\<cr>
  5913. 0: abc
  5914. ** Failers
  5915. No match
  5916. xyz\rabcdef
  5917. No match
  5918. /.*/<lf>
  5919. abc\ndef
  5920. 0: abc
  5921. 1: ab
  5922. 2: a
  5923. 3:
  5924. abc\rdef
  5925. 0: abc\x0ddef
  5926. 1: abc\x0dde
  5927. 2: abc\x0dd
  5928. 3: abc\x0d
  5929. 4: abc
  5930. 5: ab
  5931. 6: a
  5932. 7:
  5933. abc\r\ndef
  5934. 0: abc\x0d
  5935. 1: abc
  5936. 2: ab
  5937. 3: a
  5938. 4:
  5939. \<cr>abc\ndef
  5940. 0: abc\x0adef
  5941. 1: abc\x0ade
  5942. 2: abc\x0ad
  5943. 3: abc\x0a
  5944. 4: abc
  5945. 5: ab
  5946. 6: a
  5947. 7:
  5948. \<cr>abc\rdef
  5949. 0: abc
  5950. 1: ab
  5951. 2: a
  5952. 3:
  5953. \<cr>abc\r\ndef
  5954. 0: abc
  5955. 1: ab
  5956. 2: a
  5957. 3:
  5958. \<crlf>abc\ndef
  5959. 0: abc\x0adef
  5960. 1: abc\x0ade
  5961. 2: abc\x0ad
  5962. 3: abc\x0a
  5963. 4: abc
  5964. 5: ab
  5965. 6: a
  5966. 7:
  5967. \<crlf>abc\rdef
  5968. 0: abc\x0ddef
  5969. 1: abc\x0dde
  5970. 2: abc\x0dd
  5971. 3: abc\x0d
  5972. 4: abc
  5973. 5: ab
  5974. 6: a
  5975. 7:
  5976. \<crlf>abc\r\ndef
  5977. 0: abc
  5978. 1: ab
  5979. 2: a
  5980. 3:
  5981. /\w+(.)(.)?def/s
  5982. abc\ndef
  5983. 0: abc\x0adef
  5984. abc\rdef
  5985. 0: abc\x0ddef
  5986. abc\r\ndef
  5987. 0: abc\x0d\x0adef
  5988. /^\w+=.*(\\\n.*)*/
  5989. abc=xyz\\\npqr
  5990. 0: abc=xyz\\x0apqr
  5991. 1: abc=xyz\\x0apq
  5992. 2: abc=xyz\\x0ap
  5993. 3: abc=xyz\\x0a
  5994. 4: abc=xyz\
  5995. 5: abc=xyz
  5996. 6: abc=xy
  5997. 7: abc=x
  5998. 8: abc=
  5999. /^(a()*)*/
  6000. aaaa
  6001. 0: aaaa
  6002. 1: aaa
  6003. 2: aa
  6004. 3: a
  6005. 4:
  6006. /^(?:a(?:(?:))*)*/
  6007. aaaa
  6008. 0: aaaa
  6009. 1: aaa
  6010. 2: aa
  6011. 3: a
  6012. 4:
  6013. /^(a()+)+/
  6014. aaaa
  6015. 0: aaaa
  6016. 1: aaa
  6017. 2: aa
  6018. 3: a
  6019. /^(?:a(?:(?:))+)+/
  6020. aaaa
  6021. 0: aaaa
  6022. 1: aaa
  6023. 2: aa
  6024. 3: a
  6025. /(a|)*\d/
  6026. aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  6027. No match
  6028. aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
  6029. 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
  6030. /(?>a|)*\d/
  6031. aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  6032. No match
  6033. aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
  6034. 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
  6035. /(?:a|)*\d/
  6036. aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  6037. No match
  6038. aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
  6039. 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
  6040. /^a.b/<lf>
  6041. a\rb
  6042. 0: a\x0db
  6043. a\nb\<cr>
  6044. 0: a\x0ab
  6045. ** Failers
  6046. No match
  6047. a\nb
  6048. No match
  6049. a\nb\<any>
  6050. No match
  6051. a\rb\<cr>
  6052. No match
  6053. a\rb\<any>
  6054. No match
  6055. /^abc./mgx<any>
  6056. abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x85abc7 JUNK
  6057. 0: abc1
  6058. 0: abc2
  6059. 0: abc3
  6060. 0: abc4
  6061. 0: abc5
  6062. 0: abc6
  6063. 0: abc7
  6064. /abc.$/mgx<any>
  6065. abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc9
  6066. 0: abc1
  6067. 0: abc2
  6068. 0: abc3
  6069. 0: abc4
  6070. 0: abc5
  6071. 0: abc6
  6072. 0: abc9
  6073. /^a\Rb/<bsr_unicode>
  6074. a\nb
  6075. 0: a\x0ab
  6076. a\rb
  6077. 0: a\x0db
  6078. a\r\nb
  6079. 0: a\x0d\x0ab
  6080. a\x0bb
  6081. 0: a\x0bb
  6082. a\x0cb
  6083. 0: a\x0cb
  6084. a\x85b
  6085. 0: a\x85b
  6086. ** Failers
  6087. No match
  6088. a\n\rb
  6089. No match
  6090. /^a\R*b/<bsr_unicode>
  6091. ab
  6092. 0: ab
  6093. a\nb
  6094. 0: a\x0ab
  6095. a\rb
  6096. 0: a\x0db
  6097. a\r\nb
  6098. 0: a\x0d\x0ab
  6099. a\x0bb
  6100. 0: a\x0bb
  6101. a\x0cb
  6102. 0: a\x0cb
  6103. a\x85b
  6104. 0: a\x85b
  6105. a\n\rb
  6106. 0: a\x0a\x0db
  6107. a\n\r\x85\x0cb
  6108. 0: a\x0a\x0d\x85\x0cb
  6109. /^a\R+b/<bsr_unicode>
  6110. a\nb
  6111. 0: a\x0ab
  6112. a\rb
  6113. 0: a\x0db
  6114. a\r\nb
  6115. 0: a\x0d\x0ab
  6116. a\x0bb
  6117. 0: a\x0bb
  6118. a\x0cb
  6119. 0: a\x0cb
  6120. a\x85b
  6121. 0: a\x85b
  6122. a\n\rb
  6123. 0: a\x0a\x0db
  6124. a\n\r\x85\x0cb
  6125. 0: a\x0a\x0d\x85\x0cb
  6126. ** Failers
  6127. No match
  6128. ab
  6129. No match
  6130. /^a\R{1,3}b/<bsr_unicode>
  6131. a\nb
  6132. 0: a\x0ab
  6133. a\n\rb
  6134. 0: a\x0a\x0db
  6135. a\n\r\x85b
  6136. 0: a\x0a\x0d\x85b
  6137. a\r\n\r\nb
  6138. 0: a\x0d\x0a\x0d\x0ab
  6139. a\r\n\r\n\r\nb
  6140. 0: a\x0d\x0a\x0d\x0a\x0d\x0ab
  6141. a\n\r\n\rb
  6142. 0: a\x0a\x0d\x0a\x0db
  6143. a\n\n\r\nb
  6144. 0: a\x0a\x0a\x0d\x0ab
  6145. ** Failers
  6146. No match
  6147. a\n\n\n\rb
  6148. No match
  6149. a\r
  6150. No match
  6151. /^a[\R]b/<bsr_unicode>
  6152. aRb
  6153. 0: aRb
  6154. ** Failers
  6155. No match
  6156. a\nb
  6157. No match
  6158. /.+foo/
  6159. afoo
  6160. 0: afoo
  6161. ** Failers
  6162. No match
  6163. \r\nfoo
  6164. No match
  6165. \nfoo
  6166. No match
  6167. /.+foo/<crlf>
  6168. afoo
  6169. 0: afoo
  6170. \nfoo
  6171. 0: \x0afoo
  6172. ** Failers
  6173. No match
  6174. \r\nfoo
  6175. No match
  6176. /.+foo/<any>
  6177. afoo
  6178. 0: afoo
  6179. ** Failers
  6180. No match
  6181. \nfoo
  6182. No match
  6183. \r\nfoo
  6184. No match
  6185. /.+foo/s
  6186. afoo
  6187. 0: afoo
  6188. \r\nfoo
  6189. 0: \x0d\x0afoo
  6190. \nfoo
  6191. 0: \x0afoo
  6192. /^$/mg<any>
  6193. abc\r\rxyz
  6194. 0:
  6195. abc\n\rxyz
  6196. 0:
  6197. ** Failers
  6198. No match
  6199. abc\r\nxyz
  6200. No match
  6201. /^X/m
  6202. XABC
  6203. 0: X
  6204. ** Failers
  6205. No match
  6206. XABC\B
  6207. No match
  6208. /(?m)^$/<any>g+
  6209. abc\r\n\r\n
  6210. 0:
  6211. 0+ \x0d\x0a
  6212. /(?m)^$|^\r\n/<any>g+
  6213. abc\r\n\r\n
  6214. 0: \x0d\x0a
  6215. 0+
  6216. 1:
  6217. /(?m)$/<any>g+
  6218. abc\r\n\r\n
  6219. 0:
  6220. 0+ \x0d\x0a\x0d\x0a
  6221. 0:
  6222. 0+ \x0d\x0a
  6223. 0:
  6224. 0+
  6225. /(?|(abc)|(xyz))/
  6226. >abc<
  6227. 0: abc
  6228. >xyz<
  6229. 0: xyz
  6230. /(x)(?|(abc)|(xyz))(x)/
  6231. xabcx
  6232. 0: xabcx
  6233. xxyzx
  6234. 0: xxyzx
  6235. /(x)(?|(abc)(pqr)|(xyz))(x)/
  6236. xabcpqrx
  6237. 0: xabcpqrx
  6238. xxyzx
  6239. 0: xxyzx
  6240. /(?|(abc)|(xyz))(?1)/
  6241. abcabc
  6242. 0: abcabc
  6243. xyzabc
  6244. 0: xyzabc
  6245. ** Failers
  6246. No match
  6247. xyzxyz
  6248. No match
  6249. /\H\h\V\v/
  6250. X X\x0a
  6251. 0: X X\x0a
  6252. X\x09X\x0b
  6253. 0: X\x09X\x0b
  6254. ** Failers
  6255. No match
  6256. \xa0 X\x0a
  6257. No match
  6258. /\H*\h+\V?\v{3,4}/
  6259. \x09\x20\xa0X\x0a\x0b\x0c\x0d\x0a
  6260. 0: \x09 \xa0X\x0a\x0b\x0c\x0d
  6261. 1: \x09 \xa0X\x0a\x0b\x0c
  6262. \x09\x20\xa0\x0a\x0b\x0c\x0d\x0a
  6263. 0: \x09 \xa0\x0a\x0b\x0c\x0d
  6264. 1: \x09 \xa0\x0a\x0b\x0c
  6265. \x09\x20\xa0\x0a\x0b\x0c
  6266. 0: \x09 \xa0\x0a\x0b\x0c
  6267. ** Failers
  6268. No match
  6269. \x09\x20\xa0\x0a\x0b
  6270. No match
  6271. /\H{3,4}/
  6272. XY ABCDE
  6273. 0: ABCD
  6274. 1: ABC
  6275. XY PQR ST
  6276. 0: PQR
  6277. /.\h{3,4}./
  6278. XY AB PQRS
  6279. 0: B P
  6280. 1: B
  6281. /\h*X\h?\H+Y\H?Z/
  6282. >XNNNYZ
  6283. 0: XNNNYZ
  6284. > X NYQZ
  6285. 0: X NYQZ
  6286. ** Failers
  6287. No match
  6288. >XYZ
  6289. No match
  6290. > X NY Z
  6291. No match
  6292. /\v*X\v?Y\v+Z\V*\x0a\V+\x0b\V{2,3}\x0c/
  6293. >XY\x0aZ\x0aA\x0bNN\x0c
  6294. 0: XY\x0aZ\x0aA\x0bNN\x0c
  6295. >\x0a\x0dX\x0aY\x0a\x0bZZZ\x0aAAA\x0bNNN\x0c
  6296. 0: \x0a\x0dX\x0aY\x0a\x0bZZZ\x0aAAA\x0bNNN\x0c
  6297. /.+A/<crlf>
  6298. \r\nA
  6299. No match
  6300. /\nA/<crlf>
  6301. \r\nA
  6302. 0: \x0aA
  6303. /[\r\n]A/<crlf>
  6304. \r\nA
  6305. 0: \x0aA
  6306. /(\r|\n)A/<crlf>
  6307. \r\nA
  6308. 0: \x0aA
  6309. /a\Rb/I<bsr_anycrlf>
  6310. Capturing subpattern count = 0
  6311. Options: bsr_anycrlf
  6312. First char = 'a'
  6313. Need char = 'b'
  6314. a\rb
  6315. 0: a\x0db
  6316. a\nb
  6317. 0: a\x0ab
  6318. a\r\nb
  6319. 0: a\x0d\x0ab
  6320. ** Failers
  6321. No match
  6322. a\x85b
  6323. No match
  6324. a\x0bb
  6325. No match
  6326. /a\Rb/I<bsr_unicode>
  6327. Capturing subpattern count = 0
  6328. Options: bsr_unicode
  6329. First char = 'a'
  6330. Need char = 'b'
  6331. a\rb
  6332. 0: a\x0db
  6333. a\nb
  6334. 0: a\x0ab
  6335. a\r\nb
  6336. 0: a\x0d\x0ab
  6337. a\x85b
  6338. 0: a\x85b
  6339. a\x0bb
  6340. 0: a\x0bb
  6341. ** Failers
  6342. No match
  6343. a\x85b\<bsr_anycrlf>
  6344. No match
  6345. a\x0bb\<bsr_anycrlf>
  6346. No match
  6347. /a\R?b/I<bsr_anycrlf>
  6348. Capturing subpattern count = 0
  6349. Options: bsr_anycrlf
  6350. First char = 'a'
  6351. Need char = 'b'
  6352. a\rb
  6353. 0: a\x0db
  6354. a\nb
  6355. 0: a\x0ab
  6356. a\r\nb
  6357. 0: a\x0d\x0ab
  6358. ** Failers
  6359. No match
  6360. a\x85b
  6361. No match
  6362. a\x0bb
  6363. No match
  6364. /a\R?b/I<bsr_unicode>
  6365. Capturing subpattern count = 0
  6366. Options: bsr_unicode
  6367. First char = 'a'
  6368. Need char = 'b'
  6369. a\rb
  6370. 0: a\x0db
  6371. a\nb
  6372. 0: a\x0ab
  6373. a\r\nb
  6374. 0: a\x0d\x0ab
  6375. a\x85b
  6376. 0: a\x85b
  6377. a\x0bb
  6378. 0: a\x0bb
  6379. ** Failers
  6380. No match
  6381. a\x85b\<bsr_anycrlf>
  6382. No match
  6383. a\x0bb\<bsr_anycrlf>
  6384. No match
  6385. /a\R{2,4}b/I<bsr_anycrlf>
  6386. Capturing subpattern count = 0
  6387. Partial matching not supported
  6388. Options: bsr_anycrlf
  6389. First char = 'a'
  6390. Need char = 'b'
  6391. a\r\n\nb
  6392. 0: a\x0d\x0a\x0ab
  6393. a\n\r\rb
  6394. 0: a\x0a\x0d\x0db
  6395. a\r\n\r\n\r\n\r\nb
  6396. 0: a\x0d\x0a\x0d\x0a\x0d\x0a\x0d\x0ab
  6397. ** Failers
  6398. No match
  6399. a\x85\85b
  6400. No match
  6401. a\x0b\0bb
  6402. No match
  6403. /a\R{2,4}b/I<bsr_unicode>
  6404. Capturing subpattern count = 0
  6405. Partial matching not supported
  6406. Options: bsr_unicode
  6407. First char = 'a'
  6408. Need char = 'b'
  6409. a\r\rb
  6410. 0: a\x0d\x0db
  6411. a\n\n\nb
  6412. 0: a\x0a\x0a\x0ab
  6413. a\r\n\n\r\rb
  6414. 0: a\x0d\x0a\x0a\x0d\x0db
  6415. a\x85\85b
  6416. No match
  6417. a\x0b\0bb
  6418. No match
  6419. ** Failers
  6420. No match
  6421. a\r\r\r\r\rb
  6422. No match
  6423. a\x85\85b\<bsr_anycrlf>
  6424. No match
  6425. a\x0b\0bb\<bsr_anycrlf>
  6426. No match
  6427. /a(?!)|\wbc/
  6428. abc
  6429. 0: abc
  6430. /a[]b/<JS>
  6431. ** Failers
  6432. No match
  6433. ab
  6434. No match
  6435. /a[]+b/<JS>
  6436. ** Failers
  6437. No match
  6438. ab
  6439. No match
  6440. /a[]*+b/<JS>
  6441. ** Failers
  6442. No match
  6443. ab
  6444. No match
  6445. /a[^]b/<JS>
  6446. aXb
  6447. 0: aXb
  6448. a\nb
  6449. 0: a\x0ab
  6450. ** Failers
  6451. No match
  6452. ab
  6453. No match
  6454. /a[^]+b/<JS>
  6455. aXb
  6456. 0: aXb
  6457. a\nX\nXb
  6458. 0: a\x0aX\x0aXb
  6459. ** Failers
  6460. No match
  6461. ab
  6462. No match
  6463. / End of testinput7 /