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
PHP Web Logs (BLogs)
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
Submit Site
Forex Trading Online forex trading platform

Go Back Add a Comment Send this Article to a friend Add this Article to your personal favoritest for easy future access to your favorite Code Examples and Articles. Submit a code example Print this code example.
BACK ADD A COMMENT SEND TO A FRIEND ADD TO MY FAVORITES SUBMIT AN ARTICLE PRINT
Title : The Complete Regular Expression Guide
Categories : Regexps
devarticles
devarticles
Date : 2003-01-17
Grade : 0 of 5 (graded 0 times)
Viewed : 1188
Search : More Articles by devarticles
Action : Grade This Article
Tools : My Favotite Articles


  Submit your own code examples 
 


Introduction

A regular expression is a text pattern consisting of a combination of alphanumeric characters and special characters known as meta-characters. A close relative is in fact the wildcard expression, which is often used in file management. The pattern is used to match against text strings. The result of a match is either successful or not, however when a match is successful not all of the pattern must match. This is explained later in the article.

You'll find that regular expressions are used in three different ways: Regular text match, search and replace and splitting. The latter is basically the same as the reverse match i.e. everything the regular expression did not match.

Regular expressions are often simply called regexp's or RE, but for consistency I'll be referring to them with their full name throughout this article.

Due to the versatility of the regular expression, it is widely used in text processing and parsing. UNIX users are probably familiar with them through the use of the programs grep, sed, awk and ed. Text editors such as (X)Emacs and vi also use them heavily. Probably the most known use of regular expressions are in the programming language Perl. You'll find that Perl sports the most advanced regular expression implementation to this day.

In this article I will not concentrate on any particular programming language. Instead, I will provide you with a general overview of regular expressions, from which you can implement into your desired programming/scripting language.

Read More...









PHP And Regular Expressions 101
Categories : PHP, Regexps