2 Test eregi() function : basic functionality (without $regs)
5 /* Prototype : proto int eregi(string pattern, string string [, array registers])
6 * Description: Regular expression match
7 * Source code: ext/standard/reg.c
12 * Test a number of simple, valid matches with eregi, without specifying $regs
15 echo "*** Testing eregi() : basic functionality ***\n";
17 include(dirname(__FILE__) . '/regular_expressions.inc');
19 foreach ($expressions as $re) {
20 list($pattern,$string) = $re;
21 echo "--> Pattern: '$pattern'; string: '$string'\n";
22 var_dump(eregi($pattern, $string));
28 *** Testing eregi() : basic functionality ***
29 --> Pattern: '..(a|b|c)(a|b|c)..'; string: '--- ab ---'
31 Deprecated: Function eregi() is deprecated in %s on line %d
33 --> Pattern: '()'; string: ''
35 Deprecated: Function eregi() is deprecated in %s on line %d
37 --> Pattern: '()'; string: 'abcdef'
39 Deprecated: Function eregi() is deprecated in %s on line %d
41 --> Pattern: '[x]|[^x]'; string: 'abcdef'
43 Deprecated: Function eregi() is deprecated in %s on line %d
45 --> Pattern: '(a{1})(a{1,}) (b{1,3}) (c+) (d?ddd|e)'; string: '--- aaa bbb ccc ddd ---'
47 Deprecated: Function eregi() is deprecated in %s on line %d
49 --> Pattern: '\\\`\^\.\[\$\(\)\|\*\+\?\{\''; string: '\`^.[$()|*+?{''
51 Deprecated: Function eregi() is deprecated in %s on line %d
53 --> Pattern: '\a'; string: 'a'
55 Deprecated: Function eregi() is deprecated in %s on line %d
57 --> Pattern: '[0-9][^0-9]'; string: '2a'
59 Deprecated: Function eregi() is deprecated in %s on line %d
61 --> Pattern: '^[[:alnum:]]{62,62}$'; string: '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
63 Deprecated: Function eregi() is deprecated in %s on line %d
65 --> Pattern: '^[[:digit:]]{5}'; string: '0123456789'
67 Deprecated: Function eregi() is deprecated in %s on line %d
69 --> Pattern: '[[:digit:]]{5}$'; string: '0123456789'
71 Deprecated: Function eregi() is deprecated in %s on line %d
73 --> Pattern: '[[:blank:]]{1,10}'; string: '
76 Deprecated: Function eregi() is deprecated in %s on line %d
78 --> Pattern: '[[:print:]]{3}'; string: ' a '
80 Deprecated: Function eregi() is deprecated in %s on line %d