Javascript Regular Expressions

Introduction

Javascript supports regular expressions through the RegExp type.

Regular expressions are using syntax as follows:

let expression = /pattern/flags; 

The pattern part of the expression can be any regular expression.

It can be

  • character classes
  • quantifiers
  • grouping
  • look ahead
  • back references.

Each expression can have zero or more flags indicating how the expression should behave.




PreviousNext

Related