Home
last modified time | relevance | path

Searched refs:preg_match (Results 1 – 25 of 244) sorted by relevance

12345678910

/PHP-8.0/ext/pcre/tests/
H A Dnull_bytes.phpt6 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 Ddelimiters.phpt6 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 Dmatch_flags3.phpt2 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 Dpreg_match_error1.phpt2 Test preg_match() function : error conditions - bad regular expressions
7 * Testing how preg_match reacts to being passed the wrong type of regex argument
9 echo "*** Testing preg_match() : error conditions ***\n";
20 var_dump(preg_match($regex_value, $subject));
27 var_dump(preg_match($regex_value, $subject));
33 *** Testing preg_match() : error conditions ***
42 Warning: preg_match(): No ending delimiter '/' found in %spreg_match_error1.php on line %d
47 Warning: preg_match(): Unknown modifier '/' in %spreg_match_error1.php on line %d
52 Warning: preg_match(): Unknown modifier 'F' in %spreg_match_error1.php on line %d
56 preg_match(): Argument #1 ($pattern) must be of type string, array given
[all …]
H A Dpreg_match_error2.phpt2 Test preg_match() function : error conditions - wrong arg types
7 * Testing how preg_match reacts to being passed the wrong type of subject argument
9 echo "*** Testing preg_match() : error conditions ***\n";
15 var_dump(preg_match($regex, $value));
22 var_dump(preg_match($regex, $value));
29 *** Testing preg_match() : error conditions ***
35 preg_match(): Argument #2 ($subject) must be of type string, array given
36 preg_match(): Argument #2 ($subject) must be of type string, stdClass given
H A Dbug79241.phpt2 Bug #79241: Segmentation fault on preg_match()
12 // it has to be exact two calls to preg_match(),
14 var_dump(preg_match($pattern, $text, $matches, 0, 0));
15 var_dump(preg_match($pattern, $text, $matches, 0, 1));
21 var_dump(preg_match($pattern, $text, $matches, 0, 4));
22 var_dump(preg_match($pattern, $text, $matches, 0, 0));
H A Dstudy.phpt6 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 Dpreg_match_latin.phpt2 preg_match() single line match with latin input
5 preg_match('/^[\w\p{Cyrillic}\s\-\']+$/u', 'latin', $test1);
6 preg_match('/^[\w\p{Cyrillic}\s\-\']+$/u', 'кириллица', $test2);
7 preg_match('/^[\w\s\-\']+$/u', 'latin', $test3);
H A Dpreg_match_basic_edit.phpt2 Test preg_match() function : basic functionality
7 var_dump(preg_match('/^[hH]ello,\s/', $string, $match1)); //finds "Hello, "
10 var_dump(preg_match('/l^o,\s\w{5}/', $string, $match2, PREG_OFFSET_CAPTURE)); // tries to find "…
13 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…
19 var_dump(preg_match('/hello world/', $string, $match5)); //tries to find "hello world" (shoul…
H A Dpcre_extra.phpt6 var_dump(preg_match('/\y/', '\y'));
7 var_dump(preg_match('/\y/X', '\y'));
11 Warning: preg_match(): Compilation failed: unrecognized character follows \ at offset 1 in %spcre_e…
14 Warning: preg_match(): Compilation failed: unrecognized character follows \ at offset 1 in %spcre_e…
H A Dpcre_anchored.phpt12 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 Dpreg_match_basic.phpt2 Test preg_match() function : basic functionality
7 var_dump(preg_match('/^[hH]ello,\s/', $string, $match1)); //finds "Hello, "
9 var_dump(preg_match('/l^o,\s\w{5}/', $string, $match2, PREG_OFFSET_CAPTURE)); // tries to find "lo,…
11 var_dump(preg_match('/\[\*\],\s(.*)/', $string, $match3)); //finds "[*], this is \ a string";
13 var_dump(preg_match('@\w{4}\s\w{2}\s\\\(?:\s.*)@', $string, $match4, PREG_OFFSET_CAPTURE, 14)); //f…
15 var_dump(preg_match('/hello world/', $string, $match5)); //tries to find "hello world" (should be H…
H A Dbug47229.phpt9 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 Dbug40195.phpt6 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 Derrors03.phpt2 Test preg_match() function : error conditions - Internal error
6 var_dump(preg_match('/', 'Hello world'));
11 Warning: preg_match(): No ending delimiter '/' found in %s on line %d
H A Dbug79257.phpt6 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 Dmatch_flags2.phpt2 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 Dungreedy.phpt6 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 Dpcre_extended.phpt6 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 Dbug76909.phpt2 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 Dbug78272.phpt2 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 Dcache_limit.phpt16 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 Dbug78853.phpt2 Bug #78853 (preg_match() may return integer > 1)
5 var_dump(preg_match('/^|\d{1,2}$/', "7"));
H A Dinvalid_utf8_offset.phpt5 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));
/PHP-8.0/sapi/fuzzer/
H A Dgenerate_execute_corpus.php27 if (!preg_match('/\.phpt$/', $file)) continue;
29 if (!preg_match('/--FILE--\R(.*?)\R--([_A-Z]+)--/s', $fullCode, $matches)) continue;
35 if (!preg_match('/SKIP_SLOW_TESTS|SKIP_PERF_SENSITIVE|USE_ZEND_ALLOC/', $fullCode)) {

Completed in 35 milliseconds

12345678910