Home | History | Annotate | Download | only in regexp

Lines Matching refs:match

41     // 'abc'.match(new RegExp('(abc)'))
42 testcases[count++] = new TestCase ( SECTION, "'abc'.match(new RegExp('(abc)'))",
43 String(["abc","abc"]), String('abc'.match(new RegExp('(abc)'))));
45 // 'abcdefg'.match(new RegExp('a(bc)d(ef)g'))
46 testcases[count++] = new TestCase ( SECTION, "'abcdefg'.match(new RegExp('a(bc)d(ef)g'))",
47 String(["abcdefg","bc","ef"]), String('abcdefg'.match(new RegExp('a(bc)d(ef)g'))));
49 // 'abcdefg'.match(new RegExp('(.{3})(.{4})'))
50 testcases[count++] = new TestCase ( SECTION, "'abcdefg'.match(new RegExp('(.{3})(.{4})'))",
51 String(["abcdefg","abc","defg"]), String('abcdefg'.match(new RegExp('(.{3})(.{4})'))));
53 // 'aabcdaabcd'.match(new RegExp('(aa)bcd\1'))
54 testcases[count++] = new TestCase ( SECTION, "'aabcdaabcd'.match(new RegExp('(aa)bcd\\1'))",
55 String(["aabcdaa","aa"]), String('aabcdaabcd'.match(new RegExp('(aa)bcd\\1'))));
57 // 'aabcdaabcd'.match(new RegExp('(aa).+\1'))
58 testcases[count++] = new TestCase ( SECTION, "'aabcdaabcd'.match(new RegExp('(aa).+\\1'))",
59 String(["aabcdaa","aa"]), String('aabcdaabcd'.match(new RegExp('(aa).+\\1'))));
61 // 'aabcdaabcd'.match(new RegExp('(.{2}).+\1'))
62 testcases[count++] = new TestCase ( SECTION, "'aabcdaabcd'.match(new RegExp('(.{2}).+\\1'))",
63 String(["aabcdaa","aa"]), String('aabcdaabcd'.match(new RegExp('(.{2}).+\\1'))));
65 // '123456123456'.match(new RegExp('(\d{3})(\d{3})\1\2'))
66 testcases[count++] = new TestCase ( SECTION, "'123456123456'.match(new RegExp('(\\d{3})(\\d{3})\\1\\2'))",
67 String(["123456123456","123","456"]), String('123456123456'.match(new RegExp('(\\d{3})(\\d{3})\\1\\2'))));
69 // 'abcdefg'.match(new RegExp('a(..(..)..)'))
70 testcases[count++] = new TestCase ( SECTION, "'abcdefg'.match(new RegExp('a(..(..)..)'))",
71 String(["abcdefg","bcdefg","de"]), String('abcdefg'.match(new RegExp('a(..(..)..)'))));
73 // 'abcdefg'.match(/a(..(..)..)/)
74 testcases[count++] = new TestCase ( SECTION, "'abcdefg'.match(/a(..(..)..)/)",
75 String(["abcdefg","bcdefg","de"]), String('abcdefg'.match(/a(..(..)..)/)));
77 // 'xabcdefg'.match(new RegExp('(a(b(c)))(d(e(f)))'))
78 testcases[count++] = new TestCase ( SECTION, "'xabcdefg'.match(new RegExp('(a(b(c)))(d(e(f)))'))",
79 String(["abcdef","abc","bc","c","def","ef","f"]), String('xabcdefg'.match(new RegExp('(a(b(c)))(d(e(f)))'))));
81 // 'xabcdefbcefg'.match(new RegExp('(a(b(c)))(d(e(f)))\2\5'))
82 testcases[count++] = new TestCase ( SECTION, "'xabcdefbcefg'.match(new RegExp('(a(b(c)))(d(e(f)))\\2\\5'))",
83 String(["abcdefbcef","abc","bc","c","def","ef","f"]), String('xabcdefbcefg'.match(new RegExp('(a(b(c)))(d(e(f)))\\2\\5'))));
85 // 'abcd'.match(new RegExp('a(.?)b\1c\1d\1'))
86 testcases[count++] = new TestCase ( SECTION, "'abcd'.match(new RegExp('a(.?)b\\1c\\1d\\1'))",
87 String(["abcd",""]), String('abcd'.match(new RegExp('a(.?)b\\1c\\1d\\1'))));
89 // 'abcd'.match(/a(.?)b\1c\1d\1/)
90 testcases[count++] = new TestCase ( SECTION, "'abcd'.match(/a(.?)b\\1c\\1d\\1/)",
91 String(["abcd",""]), String('abcd'.match(/a(.?)b\1c\1d\1/)));