Regular Expressions

Regular expressions are text strings that represent patterns of text. Regular expressions use a complex language of symbols to represent the letters and numbers in a string. Regular expressions can be used to validate that text (for example an email address) is a particular format, or to extract a matching substring from longer text.

For example, the regular expression ^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$ could be used to validate an email address. This regular expression describes a string of letters and numbers followed by an ‘@’, followed by a domain name.

Regular expressions constitute a simple programming language in themselves. They are implemented as a library to be called from most programming languages.

{ 1 comment… read it below or add one }

Prem baweja May 17, 2011 at 9:56 am

What are binary structures in that case

Leave a Comment