Lines Matching refs:regex

19         $regex = new ParallelRegex(false);
20 $this->assertFalse($regex->apply("Hello", $match));
24 $regex = new ParallelRegex(false);
25 $regex->addPattern(".*");
26 $this->assertTrue($regex->apply("", $match));
30 $regex = new ParallelRegex(false);
31 $regex->addPattern(".*");
32 $this->assertTrue($regex->apply("Hello", $match));
36 $regex = new ParallelRegex(true);
37 $regex->addPattern("abc");
38 $this->assertTrue($regex->apply("abcdef", $match));
40 $this->assertTrue($regex->apply("AAABCabcdef", $match));
44 $regex = new ParallelRegex(false);
45 $regex->addPattern("abc");
46 $this->assertTrue($regex->apply("abcdef", $match));
48 $this->assertTrue($regex->apply("AAABCabcdef", $match));
52 $regex = new ParallelRegex(true);
53 $regex->addPattern("abc");
54 $regex->addPattern("ABC");
55 $this->assertTrue($regex->apply("abcdef", $match));
57 $this->assertTrue($regex->apply("AAABCabcdef", $match));
59 $this->assertFalse($regex->apply("Hello", $match));
62 $regex = new ParallelRegex(false);
63 $regex->addPattern("abc", "letter");
64 $regex->addPattern("123", "number");
65 $this->assertEquals($regex->apply("abcdef", $match), "letter");
67 $this->assertEquals($regex->apply("0123456789", $match), "number");
71 $regex = new ParallelRegex(true);
72 $regex->addPattern("abc");
73 $regex->addPattern("ABC");
74 $regex->addPattern("a(?!\n).{1}");
75 $this->assertTrue($regex->apply("abcdef", $match));
77 $this->assertTrue($regex->apply("AAABCabcdef", $match));
79 $this->assertTrue($regex->apply("a\nab", $match));
81 $this->assertFalse($regex->apply("Hello", $match));
84 $regex = new ParallelRegex(true);
85 $regex->addPattern("a(?i)b(?i)c");
86 $this->assertTrue($regex->apply("aBc", $match));
90 $regex = new ParallelRegex(true);
91 $regex->addPattern("(?U)\w+");
92 $this->assertTrue($regex->apply("aaaaaa", $match));
96 $regex = new ParallelRegex(true);
97 $regex->addPattern("\w(?=c)");
98 $this->assertTrue($regex->apply("xbyczd", $match));
102 $regex = new ParallelRegex(true);
103 $regex->addPattern("\w(?!b|c)");
104 $this->assertTrue($regex->apply("xbyczd", $match));
108 $regex = new ParallelRegex(true);
109 $regex->addPattern("(?<=c)\w");
110 $this->assertTrue($regex->apply("xbyczd", $match));
114 $regex = new ParallelRegex(true);
115 $regex->addPattern("(?<!\A|x|b)\w");
116 $this->assertTrue($regex->apply("xbyczd", $match));