Skip to content
Home
Dev Convert Generate Finance Calc Design Security Media

More categories

Productivity 23 SEO Tools 18 Network Tools 17 Text Tools 16 Education Tools 15 PDF Tools 11 Mockups 9

Learn and build

GuidesBlogAPI & MCPCheatsheetsChangelog All categories

Browse

439 tools · 15 categories

Start here

Popular tools New this week 11 All tools 439

Categories

Developer Tools 91 Converters 65 Calculators 32 Finance Tools 32 Generators 31 Media Tools 27 Design Tools 25 Security Tools 25 Productivity 23 SEO Tools 18 Network Tools 17 Text Tools 16 Education Tools 15 PDF Tools 11 Mockups 9

Learn and build

Guides Cheatsheets Blog REST API MCP server Changelog

No matches here.

Keep FindUtils free Sponsors fund new tools
  1. Cheatsheets
Guides Blog API & MCP
Sponsor
FindUtils
Sponsor
  1. Home
  2. Cheatsheets
  3. Programming
  4. Regular Expressions

Programming · Cheatsheet

Regular Expressions Cheatsheet

JavaScript-style regex syntax, character classes, quantifiers, groups, assertions, flags, and example shape patterns.

44 commands 8 sections

On this sheet

Character Classes 11 Quantifiers 8 Anchors & Boundaries 4 Groups & References 5 Lookahead & Lookbehind 4 Flags 5 Common Patterns 6 Sources 1
Try it in the browser Search icons from FontAwesome, Material Icons, Lucide, and Heroicons by name or keyword. Find the perfect icon instantly. Open Font Icon Search

No entry matches that filter.

Character Classes

  • . Any character except newline
  • \d Any digit [0-9]
  • \D Any non-digit [^0-9]
  • \w Any word character [a-zA-Z0-9_]
  • \W Any non-word character
  • \s Any whitespace (space, tab, newline)
  • \S Any non-whitespace
  • [abc] Match a, b, or c
  • [^abc] Match anything except a, b, or c
  • [a-z] Match any lowercase letter
  • [0-9] Match any digit

Quantifiers

  • * Zero or more times
  • + One or more times
  • ? Zero or one time (optional)
  • {3} Exactly 3 times
  • {3,} 3 or more times
  • {3,5} Between 3 and 5 times
  • *? Zero or more (lazy/non-greedy)
  • +? One or more (lazy/non-greedy)

Anchors & Boundaries

  • ^ Start of string (or line with m flag)
  • $ End of string (or line with m flag)
  • \b Word boundary
  • \B Non-word boundary

Groups & References

  • (abc) Capturing group
  • (?:abc) Non-capturing group
  • (?<name>abc) Named capturing group
  • \1 Back-reference to group 1
  • (a|b) Match a or b (alternation)

Lookahead & Lookbehind

  • (?=abc) Positive lookahead (followed by abc)
  • (?!abc) Negative lookahead (not followed by abc)
  • (?<=abc) Positive lookbehind (preceded by abc)
  • (?<!abc) Negative lookbehind (not preceded by abc)

Flags

  • g Global search (find all matches)
  • i Case-insensitive search
  • m Multi-line mode (^ and $ match line boundaries)
  • s Dotall mode (. matches newlines)
  • u Unicode mode

Common Patterns

  • ^[\w.-]+@[\w.-]+\.\w{2,}$ Email address (basic)
  • ^https?://[\w.-]+(?:/\S*)?$ URL (basic)
  • ^\d{1,3}(\.\d{1,3}){3}$ IPv4-shaped text only; also matches invalid values such as 999.999.999.999
  • ^\d{4}-\d{2}-\d{2}$ Date-shaped text only; also matches invalid values such as 2026-99-99
  • ^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$ Hex color code
  • ^\+?\d{10,15}$ Phone number (basic international)

Sources

  • https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_expressions MDN JavaScript RegExp guide: syntax, assertions, flags, and engine-specific behavior.

Related cheatsheets

  • Barcode Formats40 commands
  • JavaScript ES6+59 commands
  • Python Essentials59 commands

Guides that use these commands

  • Find and Replace Text Online: Free Tool with Regex SupportGuide · 9 min read
  • Emoji Finder: Search Keywords, Copy Symbols and Check VariantsGuide · 13 min read

Tools for this work

  • Font Icon SearchSearch icons from FontAwesome, Material Icons, Lucide, and Heroicons by name or keyword. Find the perfect icon instantly.
  • Regex TesterTest and debug regular expressions with real-time matching.
  • Text Find & ReplaceFind and replace text with regex support, case sensitivity, whole word matching, and live match highlighting.

From FindUtils

More to explore

Products and services from the team behind FindUtils.

Promote your tool
Featured product seeranks.com SeeRanks — transparent product discovery A public ranking board where paid placement is always labeled and every product keeps its earned position. View SeeRanks Public rank board #1 Sponsored #2 #3 #4 Paid placement is always labeled Free favicon tool emojifavicons.com Emoji Favicons Turn any emoji into a favicon with one HTML line. SVG, PNG or ICO, no sign-up. <link rel="icon" href=".../🦊.svg"> Create a favicon
FindUtils service findutils.com Articles for software tools A sourced article for your channels, or a sponsored FindUtils publication with editorial review. Compare packages Domain portfolio findutils.com Domain names for sale .com.dev.sh.app.io Unused names across dev tools, AI, PDF and commerce. Make an offer. Browse the list Playable ranking towerscore.io TowerScore — stack the skyline Play to climb, or buy a floor. Paid floors are labeled. Open TowerScore

Missing a tool you need?

Tell us what to build next. Most requests ship as a free browser tool, an API endpoint and an MCP tool.

Request a tool
FindUtils

Free, fast utilities. Most tools process your files in the browser; lookup tools say what they send, and pages load analytics and ads.

  • No sign-up for free tools
  • Most tools run in your browser
  • 369 tools on the REST API, 369 on MCP

Tools

DevelopersConvertPDFDesignSecurityAll tools →

Learn

GuidesBlogCheatsheetsChangelog

Build

REST APIMCP serverAPI referenceWorkflowsStatus

FindUtils

AboutLibraries we useSponsorRequest a toolDomains for saleContact
© 2026 FindUtils PrivacyTermsSitemap
Service status
FindUtils

Free, fast utilities that respect your data. Most tools run in your browser.

Build with it

REST APIMCP serverGuidesChangelog

FindUtils

AboutSponsorPrivacyContact
Theme
© 2026 FindUtils Terms
FindUtils
Guides Blog REST API MCP server Changelog

Categories

Developers 91 Convert 65 Calculate 32 Finance 32 Generate 31 Media 27
All 15 categories →

Keep it free

Sponsorship keeps every tool free and funds the new ones we ship each week.

Sponsor Back the project
Tools API Sponsor