WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDES  |  PHP CLASSES  |  CODE SEARCH  |  ARTICLES SEARCH  |  PHP FORUMS  |  PHP MANUAL  |  PHP FUNCTIONS LIST  |  WEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search
Submit a code Example / Snippet Submit Your Code
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
WeberDev's Monthly code contest PHP Code Contest
Your Personal Examples List My Favorite Examples
Your Personal Articles List My Favorite Articles
Edit Account Info Update Your Profile
PHP Code Search
Web Development Forums
Learn MySQL Playing Trivia
PHPBB2 Templates
Web Development Index
Web Development Resources
Web Development Content
PHPClasses
PHP Editor
PHP Jobs
Vision.To Design
Ajax Tutorials
PHP Programming Help
PHP/MySQL Programming
Webmaster Resources
Webmaster Forum
XML meta language
website builder
Mobile Dev World
Regular expression match with multibyte support

mb_ereg

(PHP 4 >= 4.2.0, PHP 5)

mb_eregRegular expression match with multibyte support

Description

int mb_ereg ( string $pattern , string $string [, array $regs ] )

Executes the regular expression match with multibyte support.

Parameters

pattern

The search pattern.

string

The search string.

regs

Contains a substring of the matched string.

Return Values

Executes the regular expression match with multibyte support, and returns 1 if matches are found. If the optional regs parameter was specified, the function returns the byte length of matched part, and the array regs will contain the substring of matched string. The function returns 1 if it matches with the empty string. If no matches are found or an error happens, FALSE will be returned.

Notes

Note: The internal encoding or the character encoding specified by mb_regex_encoding() will be used as the character encoding for this function.

See Also

  • mb_regex_encoding() - Returns current encoding for multibyte regex as string
  • mb_eregi() - Regular expression match ignoring case with multibyte support


A set of functions to check the validity of a credit card number.
Categories : Ecommerce, Credit Cards, PHP
How to get the 10 biggest numbers out of an INT column.
Categories : General SQL, Databases
Permutations, Combinations and Factorials
Categories : PHP, PHP Classes, Math.



Full membership authentication system.
Categories : Authentication, MySQL, PHP, Databases
How to validate an Israeli ID number.
Categories : Ecommerce, PHP, Algorithms
This function returns a random string of a specified number of digits without leading zeros. For example, if three digits are specified, the function will return a random three-digit number from 100 to 999.
Categories : Algorithms, PHP
Numbers to words
Categories : PHP, PHP Classes
color codes for positive and negative numbers
Categories : PHP, MySQL, Databases, HTML
Show Source with Line Numbers
Categories : PHP, Regexps, Filesystem
How to count the number of lines in a file
Categories : PHP, Filesystem
Dynamic WHERE CLAUSE depending on number of FORM FIELDS
Categories : ODBC, General SQL, PHP, Complete Programs, Databases
Function get_week_number which returns the week number of the given date according to ISO 8601:1988, also includes a function is_leap_year.
Categories : Date Time, PHP
Creates three SELECT form fields: Month, Day, and Year. You give it a string which will be used to make the name for the three fields, and a number of seconds to use as the default date. If you give it blank for this value, the current date is used.
Categories : HTML and PHP, PHP, Date Time
A PHP function to encrypt and decrypt a number or string or a combination of the two.
Categories : PHP, Encryption, Security