Lines Matching refs:match

8 assertEquals(["a"], "a".match(/^.(?<=a)/));
9 assertNull("b".match(/^.(?<=a)/));
10 assertEquals(["foo"], "foo1".match(/^f..(?<=.oo)/));
11 assertEquals(["foo"], "foo2".match(/^f\w\w(?<=\woo)/));
12 assertNull("boo".match(/^f\w\w(?<=\woo)/));
13 assertNull("fao".match(/^f\w\w(?<=\woo)/));
14 assertNull("foa".match(/^f\w\w(?<=\woo)/));
15 assertEquals(["def"], "abcdef".match(/(?<=abc)\w\w\w/));
16 assertEquals(["def"], "abcdef".match(/(?<=a.c)\w\w\w/));
17 assertEquals(["def"], "abcdef".match(/(?<=a\wc)\w\w\w/));
18 assertEquals(["cde"], "abcdef".match(/(?<=a[a-z])\w\w\w/));
19 assertEquals(["def"], "abcdef".match(/(?<=a[a-z][a-z])\w\w\w/));
20 assertEquals(["def"], "abcdef".match(/(?<=a[a-z]{2})\w\w\w/));
21 assertEquals(["bcd"], "abcdef".match(/(?<=a{1})\w\w\w/));
22 assertEquals(["cde"], "abcdef".match(/(?<=a{1}b{1})\w\w\w/));
23 assertEquals(["def"], "abcdef".match(/(?<=a{1}[a-z]{2})\w\w\w/));
26 assertEquals(["def"], "abcdef".match(/(?<=[a|b|c]*)[^a|b|c]{3}/));
27 assertEquals(["def"], "abcdef".match(/(?<=\w*)[^a|b|c]{3}/));
30 assertEquals(["def"], "abcdef".match(/(?<=^abc)def/));
31 assertEquals(["def"], "abcdef".match(/(?<=^[a-c]{3})def/));
32 assertEquals(["def"], "xyz\nabcdef".match(/(?<=^[a-c]{3})def/m));
33 assertEquals(["ab", "cd", "efg"], "ab\ncd\nefg".match(/(?<=^)\w+/gm));
34 assertEquals(["ab", "cd", "efg"], "ab\ncd\nefg".match(/\w+(?<=$)/gm));
35 assertEquals(["ab", "cd", "efg"], "ab\ncd\nefg".match(/(?<=^)\w+(?<=$)/gm));
36 assertNull("abcdef".match(/(?<=^[^a-c]{3})def/));
37 assertNull("foooo".match(/"^foooo(?<=^o+)$/));
38 assertNull("foooo".match(/"^foooo(?<=^o*)$/));
39 assertEquals(["foo"], "foo".match(/^foo(?<=^fo+)$/));
40 assertEquals(["foooo"], "foooo".match(/^foooo(?<=^fo*)/));
41 assertEquals(["foo", "f"], "foo".match(/^(f)oo(?<=^\1o+)$/));
42 assertEquals(["foo", "f"], "foo".match(/^(f)oo(?<=^\1o+)$/i));
43 assertEquals(["foo\u1234", "f"], "foo\u1234".match(/^(f)oo(?<=^\1o+).$/i));
44 assertEquals(["def"], "abcdefdef".match(/(?<=^\w+)def/));
45 assertEquals(["def", "def"], "abcdefdef".match(/(?<=^\w+)def/g));
48 assertEquals(["def"], "abc def".match(/(?<=\b)[d-f]{3}/));
49 assertEquals(["def"], "ab cdef".match(/(?<=\B)\w{3}/));
50 assertEquals(["def"], "ab cdef".match(/(?<=\B)(?<=c(?<=\w))\w{3}/));
51 assertNull("abcdef".match(/(?<=\b)[d-f]{3}/));
54 assertEquals(["abc"], "abcdef".match(/(?<!abc)\w\w\w/));
55 assertEquals(["abc"], "abcdef".match(/(?<!a.c)\w\w\w/));
56 assertEquals(["abc"], "abcdef".match(/(?<!a\wc)\w\w\w/));
57 assertEquals(["abc"], "abcdef".match(/(?<!a[a-z])\w\w\w/));
58 assertEquals(["abc"], "abcdef".match(/(?<!a[a-z]{2})\w\w\w/));
59 assertNull("abcdef".match(/(?<!abc)def/));
60 assertNull("abcdef".match(/(?<!a.c)def/));
61 assertNull("abcdef".match(/(?<!a\wc)def/));
62 assertNull("abcdef".match(/(?<!a[a-z][a-z])def/));
63 assertNull("abcdef".match(/(?<!a[a-z]{2})def/));
64 assertNull("abcdef".match(/(?<!a{1}b{1})cde/));
65 assertNull("abcdef".match(/(?<!a{1}[a-z]{2})def/));
68 assertEquals(["def", "c"], "abcdef".match(/(?<=(c))def/));
69 assertEquals(["def", "bc"], "abcdef".match(/(?<=(\w{2}))def/));
70 assertEquals(["def", "bc", "c"], "abcdef".match(/(?<=(\w(\w)))def/));
71 assertEquals(["def", "a"], "abcdef".match(/(?<=(\w){3})def/));
72 assertEquals(["d", "bc", undefined], "abcdef".match(/(?<=(bc)|(cd))./));
74 "abcdef".match(/(?<=([ab]{1,2})\D|(abc))\w/));
75 assertEquals(["ab", "a", "b"], "abcdef".match(/\D(?<=([ab]+))(\w)/));
76 assertEquals(["c", "d"], "abcdef".match(/(?<=b|c)\w/g));
77 assertEquals(["cd", "ef"], "abcdef".match(/(?<=[b-e])\w{2}/g));
80 assertEquals(["de", undefined], "abcdef".match(/(?<!(^|[ab]))\w{2}/));
83 assertEquals(["ef"], "abcdef".match(/(?<=ab(?=c)\wd)\w\w/));
84 assertEquals(["ef", "bc"], "abcdef".match(/(?<=a(?=([^a]{2})d)\w{3})\w\w/));
86 "abcdef".match(/(?<=a(?=([bc]{2}(?<!a{2}))d)\w{3})\w\w/));
87 assertNull("abcdef".match(/(?<=a(?=([bc]{2}(?<!a*))d)\w{3})\w\w/));
88 assertEquals(["faaa"], "faaao".match(/^faaao?(?<=^f[oa]+(?=o))/));
91 assertEquals(["b", "b", "bb"], "abb".match(/(.)(?<=(\1\1))/));
92 assertEquals(["B", "B", "bB"], "abB".match(/(.)(?<=(\1\1))/i));
93 assertEquals(["aB", "aB", "a"], "aabAaBa".match(/((\w)\w)(?<=\1\2\1)/i));
94 assertEquals(["Ba", "Ba", "a"], "aabAaBa".match(/(\w(\w))(?<=\1\2\1)/i));
95 assertEquals(["b", "b", "B"], "abaBbAa".match(/(?=(\w))(?<=(\1))./i));
96 assertEquals(["foo", "'", "foo"], " 'foo' ".match(/(?<=(.))(\w+)(?=\1)/));
97 assertEquals(["foo", "\"", "foo"], " \"foo\" ".match(/(?<=(.))(\w+)(?=\1)/));
98 assertNull(" .foo\" ".match(/(?<=(.))(\w+)(?=\1)/));
99 assertNull("ab".match(/(.)(?<=\1\1\1)/));
100 assertNull("abb".match(/(.)(?<=\1\1\1)/));
101 assertEquals(["b", "b"], "abbb".match(/(.)(?<=\1\1\1)/));
102 assertNull("ab".match(/(..)(?<=\1\1\1)/));
103 assertNull("abb".match(/(..)(?<=\1\1\1)/));
104 assertNull("aabb".match(/(..)(?<=\1\1\1)/));
105 assertNull("abab".match(/(..)(?<=\1\1\1)/));
106 assertNull("fabxbab".match(/(..)(?<=\1\1\1)/));
107 assertNull("faxabab".match(/(..)(?<=\1\1\1)/));
108 assertEquals(["ab", "ab"], "fababab".match(/(..)(?<=\1\1\1)/));
111 assertEquals(["d", "C"], "abcCd".match(/(?<=\1(\w))d/i));
112 assertEquals(["d", "x"], "abxxd".match(/(?<=\1([abx]))d/));
113 assertEquals(["c", "ab"], "ababc".match(/(?<=\1(\w+))c/));
114 assertEquals(["c", "b"], "ababbc".match(/(?<=\1(\w+))c/));
115 assertNull("ababdc".match(/(?<=\1(\w+))c/));
116 assertEquals(["c", "abab"], "ababc".match(/(?<=(\w+)\1)c/));
120 assertEquals(["xabcd", "cd", ""], "xabcd".match(/.*(?<=(..|...|....))(.*)/));
121 assertEquals(["xabcd", "bcd", ""], "xabcd".match(/.*(?<=(xx|...|....))(.*)/));
122 assertEquals(["xxabcd", "bcd", ""], "xxabcd".match(/.*(?<=(xx|...))(.*)/));
123 assertEquals(["xxabcd", "xx", "abcd"], "xxabcd".match(/.*(?<=(xx|xxx))(.*)/));
128 assertNull("abcdbc".match(/(?<=([abc]+)).\1/));
131 assertEquals(["c", "bbbbbb"], "abbbbbbc".match(/(?<=(b+))c/));
132 assertEquals(["c", "b1234"], "ab1234c".match(/(?<=(b\d+))c/));
133 assertEquals(["c", "b12b23b34"], "ab12b23b34c".match(/(?<=((?:b\d{2})+))c/));
144 assertNull("abcdef".match(/(?<=$abc)def/));
145 assertEquals(["foo"], "foo".match(/^foo(?<=foo)$/));
146 assertEquals(["foo"], "foo".match(/^f.o(?<=foo)$/));
147 assertNull("fno".match(/^f.o(?<=foo)$/));
148 assertNull("foo".match(/^foo(?<!foo)$/));
149 assertNull("foo".match(/^f.o(?<!foo)$/));
150 assertEquals(["fno"], "fno".match(/^f.o(?<!foo)$/));
151 assertEquals(["foooo"], "foooo".match(/^foooo(?<=fo+)$/));
152 assertEquals(["foooo"], "foooo".match(/^foooo(?<=fo*)$/));
158 assertNull(oob_subject.match(/(?=(abcdefghijklmn))(?<=\1)a/i));
159 assertNull(oob_subject.match(/(?=(abcdefghijklmn))(?<=\1)a/));