rx1.baseline 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453
  1. ******** replace tests
  2. JavaScript Is More Fun Than Java
  3. John Doe
  4. $1-$11,$1-$22
  5. original string: Doe, John Abe, gold C,B alan, bart replaced string: John Doe gold Abe B C bart alan
  6. fn trace : matched str: Doe, John capture1: Doe capture2: John offset: 0 org str: Doe, John Abe, gold C,B alan, bart
  7. fn trace : matched str: Abe, gold capture1: Abe capture2: gold offset: 10 org str: Doe, John Abe, gold C,B alan, bart
  8. fn trace : matched str: C,B capture1: C capture2: B offset: 21 org str: Doe, John Abe, gold C,B alan, bart
  9. fn trace : matched str: alan, bart capture1: alan capture2: bart offset: 26 org str: Doe, John Abe, gold C,B alan, bart
  10. original string: Doe, John Abe, gold C,B alan, bart function replaced string: Doe, John Abe, gold C,B Alan, bart
  11. original string: a b replaced string: a b
  12. ******** split tests
  13. regObjInst.lastIndex: 0
  14. regObjInst.Source: (<[^>]*>)
  15. regObjInst.global: false
  16. regObjInst.ignoreCase: false
  17. regObjInst.multiline: false
  18. regObjInst.options:
  19. RegExp.input: hello <b>world</b>
  20. RegExp.input, $_: hello <b>world</b>
  21. RegExp.index: 14
  22. RegExp.lastIndex: undefined
  23. RegExp.lastMatch: </b>
  24. RegExp.lastMatch, $&: </b>
  25. RegExp.lastParen: </b>
  26. RegExp.lastParen $+: </b>
  27. RegExp.leftContext: hello <b>world
  28. RegExp.leftContext $`: hello <b>world
  29. RegExp.rightContext:
  30. RegExp.rightContext $':
  31. RegExp.$1: </b>
  32. RegExp.$2:
  33. RegExp.$3:
  34. RegExp.$4:
  35. RegExp.$5:
  36. RegExp.$6:
  37. RegExp.$7:
  38. RegExp.$8:
  39. RegExp.$9:
  40. Array : hello ,<b>,world,</b>,
  41. Array input: undefined
  42. Array index: undefined
  43. Array lastIndex: undefined
  44. regObjInst.lastIndex: 0
  45. regObjInst.Source: \s*,\s*
  46. regObjInst.global: false
  47. regObjInst.ignoreCase: false
  48. regObjInst.multiline: false
  49. regObjInst.options:
  50. RegExp.input: 1, 2, 3, 4, 5
  51. RegExp.input, $_: 1, 2, 3, 4, 5
  52. RegExp.index: 10
  53. RegExp.lastIndex: undefined
  54. RegExp.lastMatch: ,
  55. RegExp.lastMatch, $&: ,
  56. RegExp.lastParen:
  57. RegExp.lastParen $+:
  58. RegExp.leftContext: 1, 2, 3, 4
  59. RegExp.leftContext $`: 1, 2, 3, 4
  60. RegExp.rightContext: 5
  61. RegExp.rightContext $': 5
  62. RegExp.$1:
  63. RegExp.$2:
  64. RegExp.$3:
  65. RegExp.$4:
  66. RegExp.$5:
  67. RegExp.$6:
  68. RegExp.$7:
  69. RegExp.$8:
  70. RegExp.$9:
  71. Array : 1,2,3,4,5
  72. Array input: undefined
  73. Array index: undefined
  74. Array lastIndex: undefined
  75. regObjInst.lastIndex: 0
  76. regObjInst.Source: a*?
  77. regObjInst.global: false
  78. regObjInst.ignoreCase: false
  79. regObjInst.multiline: false
  80. regObjInst.options:
  81. RegExp.input: ab
  82. RegExp.input, $_: ab
  83. RegExp.index: 1
  84. RegExp.lastIndex: undefined
  85. RegExp.lastMatch:
  86. RegExp.lastMatch, $&:
  87. RegExp.lastParen:
  88. RegExp.lastParen $+:
  89. RegExp.leftContext: a
  90. RegExp.leftContext $`: a
  91. RegExp.rightContext: b
  92. RegExp.rightContext $': b
  93. RegExp.$1:
  94. RegExp.$2:
  95. RegExp.$3:
  96. RegExp.$4:
  97. RegExp.$5:
  98. RegExp.$6:
  99. RegExp.$7:
  100. RegExp.$8:
  101. RegExp.$9:
  102. Array : a,b
  103. Array input: undefined
  104. Array index: undefined
  105. Array lastIndex: undefined
  106. regObjInst.lastIndex: 0
  107. regObjInst.Source: a*
  108. regObjInst.global: false
  109. regObjInst.ignoreCase: false
  110. regObjInst.multiline: false
  111. regObjInst.options:
  112. RegExp.input: ab
  113. RegExp.input, $_: ab
  114. RegExp.index: 1
  115. RegExp.lastIndex: undefined
  116. RegExp.lastMatch:
  117. RegExp.lastMatch, $&:
  118. RegExp.lastParen:
  119. RegExp.lastParen $+:
  120. RegExp.leftContext: a
  121. RegExp.leftContext $`: a
  122. RegExp.rightContext: b
  123. RegExp.rightContext $': b
  124. RegExp.$1:
  125. RegExp.$2:
  126. RegExp.$3:
  127. RegExp.$4:
  128. RegExp.$5:
  129. RegExp.$6:
  130. RegExp.$7:
  131. RegExp.$8:
  132. RegExp.$9:
  133. Array : ,b
  134. Array input: undefined
  135. Array index: undefined
  136. Array lastIndex: undefined
  137. regObjInst.lastIndex: 0
  138. regObjInst.Source: <(\/)?([^<>]+)>
  139. regObjInst.global: false
  140. regObjInst.ignoreCase: false
  141. regObjInst.multiline: false
  142. regObjInst.options:
  143. RegExp.input: A<B>bold</B>and<CODE>coded</CODE>
  144. RegExp.input, $_: A<B>bold</B>and<CODE>coded</CODE>
  145. RegExp.index: 26
  146. RegExp.lastIndex: undefined
  147. RegExp.lastMatch: </CODE>
  148. RegExp.lastMatch, $&: </CODE>
  149. RegExp.lastParen: CODE
  150. RegExp.lastParen $+: CODE
  151. RegExp.leftContext: A<B>bold</B>and<CODE>coded
  152. RegExp.leftContext $`: A<B>bold</B>and<CODE>coded
  153. RegExp.rightContext:
  154. RegExp.rightContext $':
  155. RegExp.$1: /
  156. RegExp.$2: CODE
  157. RegExp.$3:
  158. RegExp.$4:
  159. RegExp.$5:
  160. RegExp.$6:
  161. RegExp.$7:
  162. RegExp.$8:
  163. RegExp.$9:
  164. Array : A,,B,bold,/,B,and,,CODE,coded,/,CODE,
  165. Array input: undefined
  166. Array index: undefined
  167. Array lastIndex: undefined
  168. ******** string.match, regexp.exec tests
  169. regObjInst.lastIndex: 5
  170. regObjInst.Source: d(b+)(d)
  171. regObjInst.global: true
  172. regObjInst.ignoreCase: true
  173. regObjInst.multiline: false
  174. regObjInst.options: gi
  175. RegExp.input: cdbBdbsbdbdz
  176. RegExp.input, $_: cdbBdbsbdbdz
  177. RegExp.index: 1
  178. RegExp.lastIndex: undefined
  179. RegExp.lastMatch: dbBd
  180. RegExp.lastMatch, $&: dbBd
  181. RegExp.lastParen: d
  182. RegExp.lastParen $+: d
  183. RegExp.leftContext: c
  184. RegExp.leftContext $`: c
  185. RegExp.rightContext: bsbdbdz
  186. RegExp.rightContext $': bsbdbdz
  187. RegExp.$1: bB
  188. RegExp.$2: d
  189. RegExp.$3:
  190. RegExp.$4:
  191. RegExp.$5:
  192. RegExp.$6:
  193. RegExp.$7:
  194. RegExp.$8:
  195. RegExp.$9:
  196. Array : dbBd,bB,d
  197. Array input: cdbBdbsbdbdz
  198. Array index: 1
  199. Array lastIndex: undefined
  200. regObjInst.lastIndex: 0
  201. regObjInst.Source: d(b+)(d)
  202. regObjInst.global: true
  203. regObjInst.ignoreCase: true
  204. regObjInst.multiline: false
  205. regObjInst.options: gi
  206. RegExp.input: cdbBdbsbdbdz
  207. RegExp.input, $_: cdbBdbsbdbdz
  208. RegExp.index: 8
  209. RegExp.lastIndex: undefined
  210. RegExp.lastMatch: dbd
  211. RegExp.lastMatch, $&: dbd
  212. RegExp.lastParen: d
  213. RegExp.lastParen $+: d
  214. RegExp.leftContext: cdbBdbsb
  215. RegExp.leftContext $`: cdbBdbsb
  216. RegExp.rightContext: z
  217. RegExp.rightContext $': z
  218. RegExp.$1: b
  219. RegExp.$2: d
  220. RegExp.$3:
  221. RegExp.$4:
  222. RegExp.$5:
  223. RegExp.$6:
  224. RegExp.$7:
  225. RegExp.$8:
  226. RegExp.$9:
  227. Array : dbBd,dbd
  228. Array input: undefined
  229. Array index: undefined
  230. Array lastIndex: undefined
  231. regObjInst.lastIndex: 11
  232. regObjInst.Source: d(b+)(d)
  233. regObjInst.global: true
  234. regObjInst.ignoreCase: true
  235. regObjInst.multiline: false
  236. regObjInst.options: gi
  237. RegExp.input: cdbBdbsbdbdz
  238. RegExp.input, $_: cdbBdbsbdbdz
  239. RegExp.index: 8
  240. RegExp.lastIndex: undefined
  241. RegExp.lastMatch: dbd
  242. RegExp.lastMatch, $&: dbd
  243. RegExp.lastParen: d
  244. RegExp.lastParen $+: d
  245. RegExp.leftContext: cdbBdbsb
  246. RegExp.leftContext $`: cdbBdbsb
  247. RegExp.rightContext: z
  248. RegExp.rightContext $': z
  249. RegExp.$1: b
  250. RegExp.$2: d
  251. RegExp.$3:
  252. RegExp.$4:
  253. RegExp.$5:
  254. RegExp.$6:
  255. RegExp.$7:
  256. RegExp.$8:
  257. RegExp.$9:
  258. Array : dbd,b,d
  259. Array input: cdbBdbsbdbdz
  260. Array index: 8
  261. Array lastIndex: undefined
  262. regObjInst.lastIndex: 0
  263. regObjInst.Source: d(b+)(d)
  264. regObjInst.global: false
  265. regObjInst.ignoreCase: true
  266. regObjInst.multiline: false
  267. regObjInst.options: i
  268. RegExp.input: cdbBdbsbdbdz
  269. RegExp.input, $_: cdbBdbsbdbdz
  270. RegExp.index: 1
  271. RegExp.lastIndex: undefined
  272. RegExp.lastMatch: dbBd
  273. RegExp.lastMatch, $&: dbBd
  274. RegExp.lastParen: d
  275. RegExp.lastParen $+: d
  276. RegExp.leftContext: c
  277. RegExp.leftContext $`: c
  278. RegExp.rightContext: bsbdbdz
  279. RegExp.rightContext $': bsbdbdz
  280. RegExp.$1: bB
  281. RegExp.$2: d
  282. RegExp.$3:
  283. RegExp.$4:
  284. RegExp.$5:
  285. RegExp.$6:
  286. RegExp.$7:
  287. RegExp.$8:
  288. RegExp.$9:
  289. Array : dbBd,bB,d
  290. Array input: cdbBdbsbdbdz
  291. Array index: 1
  292. Array lastIndex: undefined
  293. result match empty:
  294. Matched 'Java' at position 0; next search begins at 4
  295. Matched 'Java' at position 28; next search begins at 32
  296. Result matching MMMM|MMM|MM|M with MM/dd/yyyy: MM
  297. Result match aa|a with aa: aa
  298. ******** test empty regex expressions.
  299. true
  300. true
  301. true
  302. ******** search tests
  303. true
  304. result search: 1
  305. cdbBdbsbdbdz
  306. cdbBdbsbdbdz
  307. result search: 18
  308. true
  309. result search: 18
  310. regObjInst.lastIndex: 0
  311. regObjInst.Source: falls
  312. regObjInst.global: false
  313. regObjInst.ignoreCase: true
  314. regObjInst.multiline: true
  315. regObjInst.options: im
  316. RegExp.input: The rain in Spain falls mainly in the plain.
  317. RegExp.input, $_: The rain in Spain falls mainly in the plain.
  318. RegExp.index: 18
  319. RegExp.lastIndex: undefined
  320. RegExp.lastMatch: falls
  321. RegExp.lastMatch, $&: falls
  322. RegExp.lastParen:
  323. RegExp.lastParen $+:
  324. RegExp.leftContext: The rain in Spain
  325. RegExp.leftContext $`: The rain in Spain
  326. RegExp.rightContext: mainly in the plain.
  327. RegExp.rightContext $': mainly in the plain.
  328. RegExp.$1:
  329. RegExp.$2:
  330. RegExp.$3:
  331. RegExp.$4:
  332. RegExp.$5:
  333. RegExp.$6:
  334. RegExp.$7:
  335. RegExp.$8:
  336. RegExp.$9:
  337. regObjInst.lastIndex: 0
  338. regObjInst.Source: falls
  339. regObjInst.global: false
  340. regObjInst.ignoreCase: true
  341. regObjInst.multiline: true
  342. regObjInst.options: im
  343. RegExp.input: foooooooooo
  344. RegExp.input, $_: foooooooooo
  345. RegExp.index: 18
  346. RegExp.lastIndex: undefined
  347. RegExp.lastMatch: falls
  348. RegExp.lastMatch, $&: falls
  349. RegExp.lastParen:
  350. RegExp.lastParen $+:
  351. RegExp.leftContext: The rain in Spain
  352. RegExp.leftContext $`: The rain in Spain
  353. RegExp.rightContext: mainly in the plain.
  354. RegExp.rightContext $': mainly in the plain.
  355. RegExp.$1:
  356. RegExp.$2:
  357. RegExp.$3:
  358. RegExp.$4:
  359. RegExp.$5:
  360. RegExp.$6:
  361. RegExp.$7:
  362. RegExp.$8:
  363. RegExp.$9:
  364. result search: 0
  365. regObjInst.lastIndex: 0
  366. regObjInst.Source: (\d)@(\d)@(\d)@(\d)@(\d)@(\d)@(\d)@(\d)@(\d)@(\d)@(\d+)
  367. regObjInst.global: true
  368. regObjInst.ignoreCase: false
  369. regObjInst.multiline: false
  370. regObjInst.options: g
  371. RegExp.input: 1@2@3@4@5@6@7@8@9@1@523
  372. RegExp.input, $_: 1@2@3@4@5@6@7@8@9@1@523
  373. RegExp.index: 0
  374. RegExp.lastIndex: undefined
  375. RegExp.lastMatch: 1@2@3@4@5@6@7@8@9@1@523
  376. RegExp.lastMatch, $&: 1@2@3@4@5@6@7@8@9@1@523
  377. RegExp.lastParen: 523
  378. RegExp.lastParen $+: 523
  379. RegExp.leftContext:
  380. RegExp.leftContext $`:
  381. RegExp.rightContext:
  382. RegExp.rightContext $':
  383. RegExp.$1: 1
  384. RegExp.$2: 2
  385. RegExp.$3: 3
  386. RegExp.$4: 4
  387. RegExp.$5: 5
  388. RegExp.$6: 6
  389. RegExp.$7: 7
  390. RegExp.$8: 8
  391. RegExp.$9: 9
  392. regObjInst.lastIndex: 0
  393. regObjInst.Source: (\d)@(\d)@(\d)@(\d)@(\d)@(\d)@(\d)@(\d)@(\d)@(\d)@(\d+)
  394. regObjInst.global: true
  395. regObjInst.ignoreCase: false
  396. regObjInst.multiline: false
  397. regObjInst.options: g
  398. RegExp.input: foooooooooo
  399. RegExp.input, $_: foooooooooo
  400. RegExp.index: 0
  401. RegExp.lastIndex: undefined
  402. RegExp.lastMatch: 1@2@3@4@5@6@7@8@9@1@523
  403. RegExp.lastMatch, $&: 1@2@3@4@5@6@7@8@9@1@523
  404. RegExp.lastParen: 523
  405. RegExp.lastParen $+: 523
  406. RegExp.leftContext:
  407. RegExp.leftContext $`:
  408. RegExp.rightContext:
  409. RegExp.rightContext $':
  410. RegExp.$1: 1
  411. RegExp.$2: 2
  412. RegExp.$3: 3
  413. RegExp.$4: 4
  414. RegExp.$5: 5
  415. RegExp.$6: 6
  416. RegExp.$7: 7
  417. RegExp.$8: 8
  418. RegExp.$9: 9
  419. ******** Match Demo indirect names
  420. reg match: first dolar arg contains: bB
  421. second dolar arg contains: d
  422. third dolar arg contains:
  423. ******** Misc
  424. /abc/
  425. 8
  426. aaaa
  427. a,a,a,a,a,a