Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

sql_regcase(3) [php man page]

SQL_REGCASE(3)								 1							    SQL_REGCASE(3)

sql_regcase - Make regular expression for case insensitive match

SYNOPSIS
string sql_regcase (string $string) DESCRIPTION
Creates a regular expression for a case insensitive match. Warning This function has been DEPRECATED as of PHP 5.3.0. Relying on this feature is highly discouraged. PARAMETERS
o $string - The input string. RETURN VALUES
Returns a valid regular expression which will match $string, ignoring case. This expression is $string with each alphabetic character con- verted to a bracket expression; this bracket expression contains that character's uppercase and lowercase form. Other characters remain unchanged. EXAMPLES
Example #1 sql_regcase(3) example <?php echo sql_regcase("Foo - bar."); ?> The above example will output: [Ff][Oo][Oo] - [Bb][Aa][Rr]. This can be used to achieve case insensitive pattern matching in products which support only case sensitive regular expressions. NOTES
Note As of PHP 5.3.0, the regex extension is deprecated in favor of the PCRE extension. Calling this function will issue an E_DEPRECATED notice. See the list of differences for help on converting to PCRE. PHP Documentation Group SQL_REGCASE(3)

Check Out this Related Man Page

EREG(3) 								 1								   EREG(3)

ereg - Regular expression match

SYNOPSIS
int ereg (string $pattern, string $string, [array &$regs]) DESCRIPTION
Searches a $string for matches to the regular expression given in $pattern in a case-sensitive way. Warning This function has been DEPRECATED as of PHP 5.3.0. Relying on this feature is highly discouraged. PARAMETERS
o $pattern - Case sensitive regular expression. o $string - The input string. o $regs - If matches are found for parenthesized substrings of $pattern and the function is called with the third argument $regs, the matches will be stored in the elements of the array $regs. $regs[1] will contain the substring which starts at the first left parenthesis; $regs[2] will contain the substring starting at the second, and so on. $regs[0] will contain a copy of the complete string matched. RETURN VALUES
Returns the length of the matched string if a match for $pattern was found in $string, or FALSE if no matches were found or an error occurred. If the optional parameter $regs was not passed or the length of the matched string is 0, this function returns 1. CHANGELOG
+--------+---------------------------------------------------+ |Version | | | | | | | Description | | | | +--------+---------------------------------------------------+ | 4.1.0 | | | | | | | Up to (and including) PHP 4.1.0 $regs will be | | | filled with exactly ten elements, even though | | | more or fewer than ten parenthesized substrings | | | may actually have matched. This has no effect on | | | ereg(3)'s ability to match more substrings. If no | | | matches are found, $regs will not be altered by | | | ereg(3). | | | | +--------+---------------------------------------------------+ EXAMPLES
Example #1 ereg(3) example The following code snippet takes a date in ISO format (YYYY-MM-DD) and prints it in DD.MM.YYYY format: <?php if (ereg ("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})", $date, $regs)) { echo "$regs[3].$regs[2].$regs[1]"; } else { echo "Invalid date format: $date"; } ?> NOTES
Note As of PHP 5.3.0, the regex extension is deprecated in favor of the PCRE extension. Calling this function will issue an E_DEPRECATED notice. See the list of differences for help on converting to PCRE. Tip ereg(3) is deprecated as of PHP 5.3.0. preg_match(3) is the suggested alternative to this function. SEE ALSO
eregi(3), ereg_replace(3), eregi_replace(3), preg_match(3), strpos(3), strstr(3), quotemeta(3). PHP Documentation Group EREG(3)
Man Page