GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||
GeezerVison is showing regexone.com — RegexOne - Learn Regular Expressions - Lesson 1: An Introduction, and the ABCs All Lessons
Lesson 1: An Introduction, and the ABCs
Lesson 1½: The 123s
Lesson 2: The Dot
Lesson 3: Matching specific characters
Lesson 4: Excluding specific characters
Lesson 5: Character ranges
Lesson 6: Catching some zzz's
Lesson 7: Mr. Kleene, Mr. Kleene
Lesson 8: Characters optional
Lesson 9: All this whitespace
Lesson 10: Starting and ending
Lesson 11: Match groups
Lesson 12: Nested groups
Lesson 13: More group work
Lesson 14: It's all conditional
Lesson 15: Other special characters
Lesson X: Infinity and beyond!
Practice Problems
Problem 1: Matching a decimal numbers
Problem 2: Matching phone numbers
Problem 3: Matching emails
Problem 4: Matching HTML
Problem 5: Matching specific filenames
Problem 6: Trimming whitespace from start and end of line
Problem 7: Extracting information from a log file
Problem 8: Parsing and extracting data from a URL
Problem X: Infinity and beyond!
Lesson 1: An Introduction, and the ABCs
Regular expressions are extremely useful in extracting information from text such as code, log files, spreadsheets, or even documents. And while there is a lot of theory behind formal languages, the following lessons and examples will explore the more practical uses of regular expressions so that you can use them as quickly as possible. The first thing to recognize when using regular expressions is that everything is essentially a character, and we are writing patterns to match a specific sequence of characters (also known as a string). Most patterns use normal ASCII, which includes letters, digits, punctuation and other symbols on your keyboard like %#$@!, but unicode characters can also be used to match any type of international text. Below are a couple lines of text, notice how the text changes to highlight the matching characters on each line as you type in the input field below. To continue to the next lesson, you will need to use the new syntax and concept introduced in each lesson to write a pattern that matches all the lines provided. Go ahead and try writing a pattern that matches all three rows, it may be as simple as the common letters on each line.
Exercise 1: Matching characters
Solve the above task to continue on to the next problem, or read the Solution.
Next – Lesson 1½: The 123s
Find RegexOne useful? Please consider
Donating ($4) via Paypal to support our site. Lesson Notes
| ||||||||||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |