regexone.com Open in urlscan Pro
45.55.111.221  Public Scan

URL: https://regexone.com/
Submission: On September 02 via manual from PK — Scanned from DE

Form analysis 2 forms found in the DOM

GET /lesson/letters_and_digits

<form action="/lesson/letters_and_digits" method="get">
  <input class="exercise_input_field col-xs-12 col-sm-9 col-md-9" type="text" autocapitalize="off" autocomplete="off" autocorrect="off" spellcheck="false" placeholder="Type your pattern">
  <input class="continue disabled col-xs-12 col-sm-3 col-md-3" disabled="" type="submit" value="Continue ›">
</form>

POST https://www.paypal.com/cgi-bin/webscr

<form id="paypal_form" action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
  <input type="hidden" name="cmd" value="_donations">
  <input type="hidden" name="business" value="mosannona@gmail.com">
  <input type="hidden" name="lc" value="US">
  <input type="hidden" name="item_name" value="RegexOne Donation">
  <input type="hidden" name="amount" value="4.00">
  <input type="hidden" name="currency_code" value="USD">
  <input type="hidden" name="no_note" value="0">
  <input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_SM.gif:NonHostedGuest">
  <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
  <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>

Text Content

RegexOne
Learn Regular Expressions with simple, interactive exercises.
Interactive Tutorial References & More
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!
Language Guides
C# Javascript Java PHP Python
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

Task Text   match abcdefg match abcde match abc



Solution

Try typing the first three characters abc to see them match all the lines.

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

abc… Letters 123… Digits \d Any Digit \D Any Non-digit character . Any Character
\. Period [abc] Only a, b, or c [^abc] Not a, b, nor c [a-z] Characters a to z
[0-9] Numbers 0 to 9 \w Any Alphanumeric character \W Any Non-alphanumeric
character {m} m Repetitions {m,n} m to n Repetitions * Zero or more repetitions
+ One or more repetitions ? Optional character \s Any Whitespace \S Any
Non-whitespace character ^…$ Starts and ends (…) Capture Group (a(bc)) Capture
Sub-group (.*) Capture all (abc|def) Matches abc or def


2023 © RegexOne
Email | Twitter
Additional Courses
Interactive SQL Lessons