| 1 |
<?php |
| 2 |
|
| 3 |
// Start of ereg v. |
| 4 |
|
| 5 |
/** |
| 6 |
* Regular expression match |
| 7 |
* @link http://www.php.net/manual/en/function.ereg.php |
| 8 |
* @param pattern string <p> |
| 9 |
* Case sensitive regular expression. |
| 10 |
* </p> |
| 11 |
* @param string string <p> |
| 12 |
* The input string. |
| 13 |
* </p> |
| 14 |
* @param regs array[optional] <p> |
| 15 |
* If matches are found for parenthesized substrings of |
| 16 |
* pattern and the function is called with the |
| 17 |
* third argument regs, the matches will be stored |
| 18 |
* in the elements of the array regs. |
| 19 |
* </p> |
| 20 |
* <p> |
| 21 |
* $regs[1] will contain the substring which starts at |
| 22 |
* the first left parenthesis; $regs[2] will contain |
| 23 |
* the substring starting at the second, and so on. |
| 24 |
* $regs[0] will contain a copy of the complete string |
| 25 |
* matched. |
| 26 |
* </p> |
| 27 |
* @return int the length of the matched string if a match for |
| 28 |
* pattern was found in string, |
| 29 |
* or false if no matches were found or an error occurred. |
| 30 |
* </p> |
| 31 |
* <p> |
| 32 |
* If the optional parameter regs was not passed or |
| 33 |
* the length of the matched string is 0, this function returns 1. |
| 34 |
*/ |
| 35 |
function ereg ($pattern, $string, array &$regs = null) {} |
| 36 |
|
| 37 |
/** |
| 38 |
* Replace regular expression |
| 39 |
* @link http://www.php.net/manual/en/function.ereg-replace.php |
| 40 |
* @param pattern string <p> |
| 41 |
* A POSIX extended regular expression. |
| 42 |
* </p> |
| 43 |
* @param replacement string <p> |
| 44 |
* If pattern contains parenthesized substrings, |
| 45 |
* replacement may contain substrings of the form |
| 46 |
* \digit, which will be |
| 47 |
* replaced by the text matching the digit'th parenthesized substring; |
| 48 |
* \0 will produce the entire contents of string. |
| 49 |
* Up to nine substrings may be used. Parentheses may be nested, in which |
| 50 |
* case they are counted by the opening parenthesis. |
| 51 |
* </p> |
| 52 |
* @param string string <p> |
| 53 |
* The input string. |
| 54 |
* </p> |
| 55 |
* @return string The modified string is returned. If no matches are found in |
| 56 |
* string, then it will be returned unchanged. |
| 57 |
*/ |
| 58 |
function ereg_replace ($pattern, $replacement, $string) {} |
| 59 |
|
| 60 |
/** |
| 61 |
* Case insensitive regular expression match |
| 62 |
* @link http://www.php.net/manual/en/function.eregi.php |
| 63 |
* @param pattern string <p> |
| 64 |
* Case insensitive regular expression. |
| 65 |
* </p> |
| 66 |
* @param string string <p> |
| 67 |
* The input string. |
| 68 |
* </p> |
| 69 |
* @param regs array[optional] <p> |
| 70 |
* If matches are found for parenthesized substrings of |
| 71 |
* pattern and the function is called with the |
| 72 |
* third argument regs, the matches will be stored |
| 73 |
* in the elements of the array regs. |
| 74 |
* </p> |
| 75 |
* <p> |
| 76 |
* $regs[1] will contain the substring which starts at the first left |
| 77 |
* parenthesis; $regs[2] will contain the substring starting at the |
| 78 |
* second, and so on. $regs[0] will contain a copy of the complete string |
| 79 |
* matched. |
| 80 |
* </p> |
| 81 |
* @return int the length of the matched string if a match for |
| 82 |
* pattern was found in string, |
| 83 |
* or false if no matches were found or an error occurred. |
| 84 |
* </p> |
| 85 |
* <p> |
| 86 |
* If the optional parameter regs was not passed or |
| 87 |
* the length of the matched string is 0, this function returns 1. |
| 88 |
*/ |
| 89 |
function eregi ($pattern, $string, array &$regs = null) {} |
| 90 |
|
| 91 |
/** |
| 92 |
* Replace regular expression case insensitive |
| 93 |
* @link http://www.php.net/manual/en/function.eregi-replace.php |
| 94 |
* @param pattern string <p> |
| 95 |
* A POSIX extended regular expression. |
| 96 |
* </p> |
| 97 |
* @param replacement string <p> |
| 98 |
* If pattern contains parenthesized substrings, |
| 99 |
* replacement may contain substrings of the form |
| 100 |
* \digit, which will be |
| 101 |
* replaced by the text matching the digit'th parenthesized substring; |
| 102 |
* \0 will produce the entire contents of string. |
| 103 |
* Up to nine substrings may be used. Parentheses may be nested, in which |
| 104 |
* case they are counted by the opening parenthesis. |
| 105 |
* </p> |
| 106 |
* @param string string <p> |
| 107 |
* The input string. |
| 108 |
* </p> |
| 109 |
* @return string The modified string is returned. If no matches are found in |
| 110 |
* string, then it will be returned unchanged. |
| 111 |
*/ |
| 112 |
function eregi_replace ($pattern, $replacement, $string) {} |
| 113 |
|
| 114 |
/** |
| 115 |
* Split string into array by regular expression |
| 116 |
* @link http://www.php.net/manual/en/function.split.php |
| 117 |
* @param pattern string <p> |
| 118 |
* Case sensitive regular expression. |
| 119 |
* </p> |
| 120 |
* <p> |
| 121 |
* If you want to split on any of the characters which are considered |
| 122 |
* special by regular expressions, you'll need to escape them first. If |
| 123 |
* you think split (or any other regex function, for |
| 124 |
* that matter) is doing something weird, please read the file |
| 125 |
* regex.7, included in the |
| 126 |
* regex/ subdirectory of the PHP distribution. It's |
| 127 |
* in manpage format, so you'll want to do something along the lines of |
| 128 |
* man /usr/local/src/regex/regex.7 in order to read it. |
| 129 |
* </p> |
| 130 |
* @param string string <p> |
| 131 |
* The input string. |
| 132 |
* </p> |
| 133 |
* @param limit int[optional] <p> |
| 134 |
* If limit is set, the returned array will |
| 135 |
* contain a maximum of limit elements with the |
| 136 |
* last element containing the whole rest of |
| 137 |
* string. |
| 138 |
* </p> |
| 139 |
* @return array an array of strings, each of which is a substring of |
| 140 |
* string formed by splitting it on boundaries formed |
| 141 |
* by the case-sensitive regular expression pattern. |
| 142 |
* </p> |
| 143 |
* <p> |
| 144 |
* If there are n occurrences of |
| 145 |
* pattern, the returned array will contain |
| 146 |
* n+1 items. For example, if |
| 147 |
* there is no occurrence of pattern, an array with |
| 148 |
* only one element will be returned. Of course, this is also true if |
| 149 |
* string is empty. If an error occurs, |
| 150 |
* split returns false. |
| 151 |
*/ |
| 152 |
function split ($pattern, $string, $limit = null) {} |
| 153 |
|
| 154 |
/** |
| 155 |
* Split string into array by regular expression case insensitive |
| 156 |
* @link http://www.php.net/manual/en/function.spliti.php |
| 157 |
* @param pattern string <p> |
| 158 |
* Case insensitive regular expression. |
| 159 |
* </p> |
| 160 |
* <p> |
| 161 |
* If you want to split on any of the characters which are considered |
| 162 |
* special by regular expressions, you'll need to escape them first. If |
| 163 |
* you think spliti (or any other regex function, for |
| 164 |
* that matter) is doing something weird, please read the file |
| 165 |
* regex.7, included in the |
| 166 |
* regex/ subdirectory of the PHP distribution. It's |
| 167 |
* in manpage format, so you'll want to do something along the lines of |
| 168 |
* man /usr/local/src/regex/regex.7 in order to read it. |
| 169 |
* </p> |
| 170 |
* @param string string <p> |
| 171 |
* The input string. |
| 172 |
* </p> |
| 173 |
* @param limit int[optional] <p> |
| 174 |
* If limit is set, the returned array will |
| 175 |
* contain a maximum of limit elements with the |
| 176 |
* last element containing the whole rest of |
| 177 |
* string. |
| 178 |
* </p> |
| 179 |
* @return array an array of strings, each of which is a substring of |
| 180 |
* string formed by splitting it on boundaries formed |
| 181 |
* by the case insensitive regular expression pattern. |
| 182 |
* </p> |
| 183 |
* <p> |
| 184 |
* If there are n occurrences of |
| 185 |
* pattern, the returned array will contain |
| 186 |
* n+1 items. For example, if |
| 187 |
* there is no occurrence of pattern, an array with |
| 188 |
* only one element will be returned. Of course, this is also true if |
| 189 |
* string is empty. If an error occurs, |
| 190 |
* spliti returns false. |
| 191 |
*/ |
| 192 |
function spliti ($pattern, $string, $limit = null) {} |
| 193 |
|
| 194 |
/** |
| 195 |
* Make regular expression for case insensitive match |
| 196 |
* @link http://www.php.net/manual/en/function.sql-regcase.php |
| 197 |
* @param string string <p> |
| 198 |
* The input string. |
| 199 |
* </p> |
| 200 |
* @return string a valid regular expression which will match |
| 201 |
* string, ignoring case. This expression is |
| 202 |
* string with each alphabetic character converted to |
| 203 |
* a bracket expression; this bracket expression contains that character's |
| 204 |
* uppercase and lowercase form. Other characters remain unchanged. |
| 205 |
*/ |
| 206 |
function sql_regcase ($string) {} |
| 207 |
|
| 208 |
// End of ereg v. |
| 209 |
?> |