© Zsolt Nagy 2018
Zsolt NagyRegex Quick Syntax Referencehttps://doi.org/10.1007/978-1-4842-3876-9_2

2. Regex Syntax 101

Zsolt Nagy1 
(1)
Berlin, Germany
 

When learning a new tool, you always have to get started somewhere.

The goal of this chapter is to give you a basic subset of the regular expression syntax to play with. Learning all the syntax is not productive, though, because let’s face it, learning advanced regular expression syntax all at once is too much for anyone.

Formulating an Expression

A regular expression is written inside a starting slash and an ending slash character: /re/.

As you saw in Chapter 1, this expression matches strings containing re.

Some programming languages allow you or require you to use a different notation. For instance, ...

Get Regex Quick Syntax Reference: Understanding and Using Regular Expressions now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.