/PHP-7.4/ext/pcre/tests/ |
H A D | null_bytes.phpt | 6 preg_match("\0//i", ""); 7 preg_match("/\0/i", ""); 8 preg_match("//\0i", ""); 9 preg_match("//i\0", ""); 10 preg_match("/\\\0/i", ""); 12 preg_match("\0[]i", ""); 13 preg_match("[\0]i", ""); 14 preg_match("[]\0i", ""); 15 preg_match("[]i\0", ""); 16 preg_match("[\\\0]i", ""); [all …]
|
H A D | delimiters.phpt | 6 var_dump(preg_match('', '')); 7 var_dump(preg_match(' ', '')); 8 var_dump(preg_match('@@', '')); 9 var_dump(preg_match('12', '')); 10 var_dump(preg_match('<>', '')); 11 var_dump(preg_match('~a', '')); 12 var_dump(preg_match('@\@\@@', '@@')); 13 var_dump(preg_match('//z', '@@')); 14 var_dump(preg_match('{', '')); 18 Warning: preg_match(): Empty regular expression in %sdelimiters.php on line 3 [all …]
|
H A D | match_flags3.phpt | 2 preg_match() flags 3 6 var_dump(preg_match('', '', $match, 0xfff)); 8 var_dump(preg_match('/\d+/', '123 456 789 012', $match, 0, -8)); 11 var_dump(preg_match('/\d+/', '123 456 789 012', $match, 0, -500)); 17 var_dump(preg_match('/(?P<3>)/', '')); 21 Warning: preg_match(): Empty regular expression in %smatch_flags3.php on line 3 44 Warning: preg_match(): Compilation failed: %s name must start with a non-digit at offset %d in %sma…
|
H A D | preg_match_error1.phpt | 2 Test preg_match() function : error conditions - bad regular expressions 6 …* proto int preg_match(string pattern, string subject [, array subpatterns [, int flags [, int of… 11 * Testing how preg_match reacts to being passed the wrong type of regex argument 13 echo "*** Testing preg_match() : error conditions ***\n"; 23 var_dump(preg_match($regex_value, $subject)); 26 var_dump(preg_match($regex_value, $subject)); 29 *** Testing preg_match() : error conditions *** 38 Warning: preg_match(): No ending delimiter '/' found in %spreg_match_error1.php on line %d 43 Warning: preg_match(): Unknown modifier '/' in %spreg_match_error1.php on line %d 48 Warning: preg_match(): Unknown modifier 'F' in %spreg_match_error1.php on line %d [all …]
|
H A D | preg_match_error2.phpt | 2 Test preg_match() function : error conditions - wrong arg types 6 …* proto int preg_match(string pattern, string subject [, array subpatterns [, int flags [, int of… 11 * Testing how preg_match reacts to being passed the wrong type of subject argument 13 echo "*** Testing preg_match() : error conditions ***\n"; 18 var_dump(preg_match($regex, $value)); 21 var_dump(preg_match($regex, $value)); 25 *** Testing preg_match() : error conditions *** 32 Warning: preg_match() expects parameter 2 to be string, array given in %spreg_match_error2.php on l… 35 Warning: preg_match() expects parameter 2 to be string, object given in %spreg_match_error2.php on …
|
H A D | study.phpt | 6 var_dump(preg_match('/(?:(?:(?:(?:(?:(.))))))/ S', 'aeiou', $dump)); 8 var_dump(preg_match('/(?:(?:(?:(?:(?:(.))))))/', 'aeiou', $dump)); 11 var_dump(preg_match('/(?>..)((?:(?>.)|.|.|.|u))/S', 'aeiou', $dump)); 15 var_dump(preg_match('/^aeiou$/S', 'aeiou', $dump)); 17 var_dump(preg_match('/aeiou/S', 'aeiou', $dump));
|
H A D | bug79241.phpt | 2 Bug #79241: Segmentation fault on preg_match() 14 // it has to be exact two calls to preg_match(), 16 var_dump(preg_match($pattern, $text, $matches, 0, 0)); 17 var_dump(preg_match($pattern, $text, $matches, 0, 1)); 23 var_dump(preg_match($pattern, $text, $matches, 0, 4)); 24 var_dump(preg_match($pattern, $text, $matches, 0, 0));
|
H A D | preg_match_latin.phpt | 2 preg_match() single line match with latin input 5 /* Prototype : int preg_match ( string $pattern , string $subject [, array &$matches [, int $f… 10 preg_match('/^[\w\p{Cyrillic}\s\-\']+$/u', 'latin', $test1); 11 preg_match('/^[\w\p{Cyrillic}\s\-\']+$/u', 'кириллица', $test2); 12 preg_match('/^[\w\s\-\']+$/u', 'latin', $test3);
|
H A D | preg_match_basic.phpt | 2 Test preg_match() function : basic functionality 6 …* proto int preg_match(string pattern, string subject [, array subpatterns [, int flags [, int of… 10 var_dump(preg_match('/^[hH]ello,\s/', $string, $match1)); //finds "Hello, " 12 var_dump(preg_match('/l^o,\s\w{5}/', $string, $match2, PREG_OFFSET_CAPTURE)); // tries to find "lo,… 14 var_dump(preg_match('/\[\*\],\s(.*)/', $string, $match3)); //finds "[*], this is \ a string"; 16 var_dump(preg_match('@\w{4}\s\w{2}\s\\\(?:\s.*)@', $string, $match4, PREG_OFFSET_CAPTURE, 14)); //f… 18 var_dump(preg_match('/hello world/', $string, $match5)); //tries to find "hello world" (should be H…
|
H A D | preg_match_basic_edit.phpt | 2 Test preg_match() function : basic functionality 5 /* Prototype : proto int preg_match(string pattern, string subject [, array subpatterns [, int fla… 14 var_dump(preg_match('/^[hH]ello,\s/', $string, $match1)); //finds "Hello, " 17 var_dump(preg_match('/l^o,\s\w{5}/', $string, $match2, PREG_OFFSET_CAPTURE)); // tries to find "… 20 var_dump(preg_match('/\[\*\],\s(.*)/', $string, $match3)); //finds "[*], this is \ a string"; 23 var_dump(preg_match('@\w{4}\s\w{2}\s\\\(?:\s.*)@', $string, $match4, PREG_OFFSET_CAPTURE, 14)); //f… 26 var_dump(preg_match('/hello world/', $string, $match5)); //tries to find "hello world" (shoul…
|
H A D | pcre_anchored.phpt | 12 var_dump(preg_match('/\PN+/', '123abc', $m)); 15 var_dump(preg_match('/\P{N}+/A', '123abc')); 16 var_dump(preg_match('/^\P{N}+/', '123abc')); 17 var_dump(preg_match('/^\P{N}+/A', '123abc'));
|
H A D | bug47229.phpt | 9 preg_match('/[a\-c]+/', 'a---b', $m); 12 preg_match('/[a\-c]+/', 'a\-', $m); 15 preg_match("/a\-{2,}/", 'a----a', $m); 18 preg_match("/a\-{1,}/", 'a\----a', $m);
|
H A D | bug40195.phpt | 6 var_dump(preg_match('@^(/([a-z]*))*$@', '//abcde', $m)); var_dump($m); 7 var_dump(preg_match('@^(/(?:[a-z]*))*$@', '//abcde', $m)); var_dump($m); 9 var_dump(preg_match('@^(/([a-z]+))+$@', '/a/abcde', $m)); var_dump($m); 10 var_dump(preg_match('@^(/(?:[a-z]+))+$@', '/a/abcde', $m)); var_dump($m);
|
H A D | pcre_extra.phpt | 6 var_dump(preg_match('/\y/', '\y')); 7 var_dump(preg_match('/\y/X', '\y')); 13 Warning: preg_match(): Compilation failed: unrecognized character follows \ at offset 1 in %spcre_e…
|
H A D | bug79257.phpt | 6 preg_match('/(?J)(?:(?<g>foo)|(?<g>bar))/', 'foo', $matches); 8 preg_match('/(?J)(?:(?<g>foo)|(?<g>bar))/', 'foo', $matches, 11 preg_match('/(?J)(?:(?<g>foo)|(?<g>bar))/', 'foo', $matches, 14 preg_match('/(?J)(?:(?<g>foo)|(?<g>bar))/', 'foo', $matches, 18 preg_match('/(?J)(?:(?<g>foo)|(?<g>bar))(?<h>baz)/', 'foobaz', $matches); 20 preg_match('/(?J)(?:(?<g>foo)|(?<g>bar))(?<h>baz)/', 'foobaz', $matches, 23 preg_match('/(?J)(?:(?<g>foo)|(?<g>bar))(?<h>baz)/', 'foobaz', $matches, 26 preg_match('/(?J)(?:(?<g>foo)|(?<g>bar))(?<h>baz)/', 'foobaz', $matches,
|
H A D | match_flags2.phpt | 2 preg_match() flags 6 var_dump(preg_match('/x(.)/', 'fjszxax', $match, PREG_OFFSET_CAPTURE)); 9 var_dump(preg_match('/(.)x/', 'fjszxax', $match, PREG_OFFSET_CAPTURE, 4)); 12 var_dump(preg_match('/(?P<capt1>.)(x)(?P<letsmix>\S+)/', 'fjszxax', $match, PREG_OFFSET_CAPTURE));
|
H A D | ungreedy.phpt | 6 var_dump(preg_match('/<.*>/', '<aa> <bb> <cc>', $m)); 9 var_dump(preg_match('/<.*>/U', '<aa> <bb> <cc>', $m)); 12 var_dump(preg_match('/(?U)<.*>/', '<aa> <bb> <cc>', $m));
|
H A D | pcre_extended.phpt | 6 var_dump(preg_match('/a e i o u/', 'aeiou', $m)); 9 var_dump(preg_match('/a e i o u/x', 'aeiou', $m)); 12 var_dump(preg_match("/a e\ni\to\ru/x", 'aeiou', $m));
|
H A D | bug76909.phpt | 2 Bug #76909 preg_match difference between 7.3 and < 7.3 16 $n0 = preg_match($reg0, $data, $m0); 17 $n1 = preg_match($reg1, $data, $m1);
|
H A D | preg_match_basic_002.phpt | 2 preg_match() single line match with multi-line input 5 /* Prototype : int preg_match ( string $pattern , string $subject [, array &$matches [, int $f… 11 preg_match("/M(.*)/", $string, $matches);
|
H A D | bug78272.phpt | 2 Bug #78272: calling preg_match() before pcntl_fork() will freeze child process 9 preg_match('/abc/', 'abcde', $r); 14 preg_match('/abc/', 'abcde', $r);
|
H A D | cache_limit.phpt | 16 if (!preg_match("/$re/", $str)) { 21 var_dump(preg_match('/./', $str)); // this one was already deleted from the cache 22 var_dump(preg_match("/$re/", $str)); // but not this one
|
H A D | bug78853.phpt | 2 Bug #78853 (preg_match() may return integer > 1) 5 var_dump(preg_match('/^|\d{1,2}$/', "7"));
|
H A D | preg_match_variation1.phpt | 2 Test preg_match() function : variation 6 …* proto int preg_match(string pattern, string subject [, array subpatterns [, int flags [, int of… 13 preg_match('/[\-\+]?[0-9\.]*/', $string, $string);
|
H A D | invalid_utf8_offset.phpt | 5 if (@preg_match('/./u', '') === false) { 14 var_dump(preg_match('~.*~u', $string, $m, 0, 1)); 18 var_dump(preg_match('~.*~u', $string, $m, 0, 2));
|