Regular expressions can be hard to remember, no wonder you have landed on this page. Below you will find a full list of regular expressions you can use in JavaScript with their meaning explained.
Get access to 300+ webtips π
Level up your skills and master the art of frontend development with bite-sized tutorials.
We don't spam. Unsubscribe anytime.
Flags
Flag
Explanation
g
Match globally
i
Case insensitive matching
m
Match on multiple lines when using anchors
s (dotall)
Makes . to match new lines as well
u
Unicode support
Anchors
Regex
Explanation
^a
Starts with the next character (a)
z$
Ends with the preceding character (z)
Looking to improve your skills? Check out our interactive course to master JavaScript from start to finish.
Level up your skills and master the art of frontend development with bite-sized tutorials.
We don't spam. Unsubscribe anytime.
Rocket Launch Your Career
Speed up your learning progress with our mentorship program. Join as a mentee to unlock the full potential of Webtips and get a personalized learning experience by experts to master the following frontend technologies:
This site uses cookies We use cookies to understand visitors and create a better experience for you. By clicking on "Accept", you accept its use. To find out more, please see our privacy policy.
Get access to 300+ webtips π
Level up your skills and master the art of frontend development with bite-sized tutorials.