• ARعربي
  • ENEnglish
  • ESEspañol
  • FAفارسی
  • FRFrançais
  • IDIndonesia
  • ITItaliano
  • JA日本語
  • KO한국어
  • RUРусский
  • TRTürkçe
  • UKУкраїнська
  • ZH简体中文

We want to make this open-source project available for people all around the world.

Help to translate the content of this tutorial to your language!

    BuyEPUB/PDF
    Tutorial map
    Share
    1. Tutorial

    Regular expressions

    Regular expressions is a powerful way of doing search and replace in strings.

    1. Patterns and flags
    2. Character classes
    3. Unicode: flag "u" and class \p{...}
    4. Anchors: string start ^ and end $
    5. Multiline mode of anchors ^ $, flag "m"
    6. Word boundary: \b
    7. Escaping, special characters
    8. Sets and ranges [...]
    9. Quantifiers +, *, ? and {n}
    10. Greedy and lazy quantifiers
    11. Capturing groups
    12. Backreferences in pattern: \N and \k<name>
    13. Alternation (OR) |
    14. Lookahead and lookbehind
    15. Catastrophic backtracking
    16. Sticky flag "y", searching at position
    17. Methods of RegExp and String
    Previous lessonNext lesson
    Share
    Tutorial map

    Sibling chapters

    • The JavaScript language
    • Browser: Document, Events, Interfaces
    • Frames and windows
    • Binary data, files
    • Network requests
    • Storing data in the browser
    • Animation
    • Web components
    • Regular expressions
    Share
    Edit on GitHub
    • © 2007—2025  Ilya Kantor
    • about the project
    • contact us
    • terms of usage
    • privacy policy