Appendix. Learning to use regular expressions

A regular expression is a compact way of describing complex patterns in texts. You can use them to search for patterns and, once found, modify the patterns in complex ways. They can also be used to launch programmatic actions that depend on patterns.

Regular expressions are amazingly powerful and deeply expressive. That is the very reason writing them is just as error-prone as writing any other complex programming code. It is always better to solve a genuinely simple problem simply; when you go beyond simple, think about regular expressions.

For purposes of presenting examples in this tutorial, regular expressions will be surrounded by forward slashes. This style of delimiting regular expressions ...

Get Regular Expression Puzzles and AI Coding Assistants 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.