Skip to content
DeveloperPDFImagesFinanceUtilitiesLearnGamesWeatherCurrency
Sign in
  1. Learn
  2. Regular expressions

Regular expressions

Read a pattern someone else wrote, and write one that does what you meant.

Written for anyone who has copied a pattern from an answer online and wanted to know what it does. No prior regex needed; some familiarity with a text editor or a programming language helps.

4 lessons · about 13 minutes

Start: What a pattern actually matches

Practise all 8 questions

  1. 1What a pattern actually matchesA regex is a description of text, tried at every position until something fits.3 min
  2. 2Character classes: one of theseSquare brackets describe a single character by listing what it may be.3 min
  3. 3Quantifiers: how many, and how greedyQuantifiers repeat the thing before them, and by default they take as much as they can.3 min
  4. 4Anchors and groups: where, and which partAnchors tie a pattern to a position; groups decide what you get back.4 min

Every tool you need, in one fast and private workspace. Tools run in your browser; no ads, no trackers.

Workspaces

  • Developer
  • PDF
  • Images
  • Finance
  • India
  • Utilities
  • Live
  • Learn
  • Play

Categories

  • All tools
  • Calculators
  • India Tools
  • Developer Tools
  • Everyday Utilities
  • PDF & Documents
  • Image Tools
  • Device Tests
  • Gaming Tools
  • Charts & Graphs
  • Vehicle & Travel
  • Home & Everyday
  • Audio & Video
  • Study Calculators
  • Productivity
  • Business Documents
  • Science & Engineering
  • Games

Resources

  • About
  • Privacy
  • Terms
  • Contact
  • Your data

Free · Tools run in your browser · Accounts optional · © ToolsDev

HomeDeveloperToolsFinanceLearn