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

6. Character Sets and Character Classes

Zsolt Nagy1 
(1)
Berlin, Germany
 

The previous chapter introduced finite state machines to make regular expressions easier to understand. In this chapter, you will learn the tools you need to create more complex finite state machines to perform advanced pattern matching tasks with regular expressions.

We will build on Chapter 2, assuming that you know how to handle literal characters, concatenation, the or operator, the dot character, grouping operators with parentheses, anchored start and end, and modifiers.

Character Sets

A character set matches strings containing any of the characters in the set.

In Perl 6, character ...

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.