Preview

regular expression and it's applications

Powerful Essays
Open Document
Open Document
1179 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
regular expression and it's applications
REGULAR EXPRESSIONS AND IT’S APPLICATIONS

REGULAR EXPRESSIONS
A regular expression is a specific pattern that provides concise and flexible means to "match" (specify and recognize) strings of text, such as particular characters, words, or patterns of characters. Common abbreviations for "regular expression” include regex and regexp. It is a Compact mechanism for defining a language.

OPERANDS OF REGULAR EXPRESSION
The empty string ε
Single characters of the underlying alphabet
Shorthand for groups of characters
(Letter for A-Z or a-z, digit for 0-9, etc.)
Legal regular expressions (an operator might be applied to the result of an operator)

REGULAR EXPRESSION OPERATORS

PRECEDENCE OF OPERATORS

APPLICATION: WEB SEARCH ENGINES
One use of regular expressions that used to be very common was in web search engines. Archie, one of the first search engines, used regular expressions exclusively to search through a database of filenames on public FTP servers. Once the World Wide Web started to take form, the first search engines for it also used regular expressions to search through their indexes. Regular expressions were chosen for these early search engines because of both their power and easy implementation. A query such as regular expression could be translated into the following regular expression.

, then, of course, would be the set of all characters in the character encoding used with this search engine. The results returned to the user would be the set of web pages that were accepted by this regular expression.
APPLICATION: SOFTWARE ENGINEERING
Software applications are nowadays component-based for reusability. A problem with component based applications is how to precisely define the interplay on the component interfaces. Since a programmer does not have complete control over the integrating components, it can lead to unpredictable behavior. Solving this problem would make it easy to understand the

You May Also Find These Documents Helpful

Related Topics