Home
last modified time | relevance | path

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

1234567

/PHP-5.5/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 Dpreg_match_error.phpt2 Test preg_match() function : error conditions - wrong numbers of parameters
9 echo "*** Testing preg_match() : error conditions ***\n";
11 echo "\n-- Testing preg_match() function with Zero arguments --\n";
12 var_dump(preg_match());
13 //Test preg_match with one more than the expected number of arguments
21 // Testing preg_match withone less than the expected number of arguments
24 var_dump(preg_match($pattern));
28 *** Testing preg_match() : error conditions ***
30 -- Testing preg_match() function with Zero arguments --
35 -- Testing preg_match() function with more than expected no. of arguments --
[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>)/', ''));
22 Warning: preg_match(): Empty regular expression in %smatch_flags3.php on line 3
45 Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset %d in %…
H A Dpreg_match_error1.phpt2 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));
30 *** Testing preg_match() : error conditions ***
39 Warning: preg_match(): No ending delimiter '/' found in %spreg_match_error1.php on line %d
44 Warning: preg_match(): Unknown modifier '/' in %spreg_match_error1.php on line %d
49 Warning: preg_match(): Unknown modifier 'F' in %spreg_match_error1.php on line %d
[all …]
H A Dpreg_match_error2.phpt2 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));
26 *** Testing preg_match() : error conditions ***
33 Warning: preg_match() expects parameter 2 to be string, array given in %spreg_match_error2.php on l…
36 Warning: preg_match() expects parameter 2 to be string, object given in %spreg_match_error2.php on …
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_basic.phpt2 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 Dpreg_match_basic_edit.phpt2 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 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 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 Dpcre_extra.phpt6 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 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 Dcache_limit.phpt12 if (!preg_match("/$re/", $str)) {
17 var_dump(preg_match('/./', $str)); // this one was already deleted from the cache
18 var_dump(preg_match("/$re/", $str)); // but not this one
H A Dpreg_match_basic_002.phpt2 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 Dpreg_match_variation1.phpt2 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 Dinvalid_utf8_offset.phpt5 if (@preg_match('/./u', '') === false) {
14 var_dump(preg_match(b'~.*~u', $string, $m, 0, 1));
18 var_dump(preg_match(b'~.*~u', $string, $m, 0, 2));
H A Dlocales.phpt17 var_dump(preg_match('/^\w{6}$/', 'a�����'));
20 var_dump(preg_match('/^\w{6}$/', 'a�����'));
23 var_dump(preg_match('/^\w{6}$/', 'a�����'));
H A Dbug52732.phpt2 Bug #52732 (Docs say preg_match() returns FALSE on error, but it returns int(0))
7 $ret = preg_match('/(?:\D+|<\d+>)*[!?]/', 'foobar foobar foobar');
H A Dbug70345.phpt13 preg_match($regex, $subject, $matches);
22 Warning: preg_match(): Get subpatterns list failed in %s on line %d
/PHP-5.5/ext/gd/tests/
H A Dfunc.inc22 if (preg_match(',FreeType Version => (\d+\.\d+\.\d+),s', get_php_info(), $match)) {
33 if (preg_match(',libJPEG Version => ([a-z0-9]+),s', get_php_info(), $match)) {
44 if (preg_match(',libPNG Version => (\d+\.\d+\.\d+),s', get_php_info(), $match)) {
55 if (preg_match(',libXpm Version => (\d+),s', get_php_info(), $match)) {
/PHP-5.5/ext/ftp/tests/
H A Dserver.inc142 if (!preg_match('/^USER (\w+)\r\n$/', $buf, $m)) {
223 } elseif (preg_match("~^STOR ([\w/.-]+)\r\n$~", $buf, $m)) {
300 } elseif (preg_match('/^USER /', $buf)) {
303 } elseif (preg_match('/^MDTM ([\w\h]+)/', $buf, $matches)) {
321 }elseif (preg_match('/^RETR ([\w\h]+)/', $buf, $matches)) {
386 }elseif (preg_match('/^PASV/', $buf, $matches)) {
394 } elseif (preg_match('/^SITE EXEC/', $buf, $matches)) {
397 } elseif (preg_match('/^RMD/', $buf, $matches)) {
400 } elseif (preg_match('/^SITE CHMOD/', $buf, $matches)) {
403 } elseif (preg_match('/^ALLO (\d+)/', $buf, $matches)) {
[all …]

Completed in 53 milliseconds

1234567