Lesson 1. Introducing Regular Expressions
In this lesson you’ll learn what regular expressions are and what they can do for you.
Understanding the Need
Regular expressions (or regex, for short) are tools, and like all tools, regular expressions are designed to solve a very specific problem. The best way to understand regular expressions and what they do is to understand the problem they solve.
Consider the following scenarios:
• You are searching for a file containing the text
car (regardless of case) but do not want to also locate
car in the middle of a word (for example,
• You are generating a Web page dynamically (using an application server) and need to display text retrieved from a database. Text may contain ...