Regular Expressions Patterns

"A Blog on Regular Expressions Patterns"

Sunday, February 28, 2010

Basic Definition of Regular Expression

While searching on the net, I found these definitions about the regular expression, and I felt, this definition of regular expression would be best suited for all needs.

(computing) A concise description of a pattern to be matched during a string search. The pattern is written according to one of several small formal languages devised for this purpose, and may call for matching fixed strings, runs of arbitrary characters, characters selected from a set, alternate words, and other specifics.

* Example: "^Tthis is .
* test
" is a regular expression which matches the string "This is", followed by an arbitrary string of characters, followed by the word "test". The matched string must begin at the beginning of the line. The word "this" may be capitalized or not. The notation ".
*
" matches any number (0 or more) of any character.

0 comments:

Post a Comment