liveBook · Manning

Regular expression

A formal pattern notation that describes sets of strings and enables text to be matched, searched, extracted, or transformed.

How 27 Manning books explain it

Regular Expression Puzzles and AI Coding Assistants

A pattern notation and matching language for describing sets of strings and locating or transforming text that conforms to those patterns.

How it is used
Uses patterns to match, validate, extract, and transform text, then probes whether candidate solutions satisfy exact requirements.
How deep it goes
Works through quantifiers, anchors, lookahead, backreferences, edge cases, and catastrophic backtracking rather than offering an exhaustive syntax reference.
Examples
Uses x…y words, telomere sequences, message protocols, domino plays, signal art, poker hands, and substring counting.
What you can do after
Evaluate/understand regex solutions by testing boundaries, overlap, malformed inputs, and performance rather than accepting plausible output.

Read how Regular Expression Puzzles and AI Coding Assistants explains regular expression →

Natural Language Processing in Action, Second Edition

A regular expression is a formal pattern notation for matching and extracting strings that satisfy specified character or sequence constraints.

How it is used
Uses character-pattern matching to recognize chatbot greetings, segment sentences, and extract structured details from text.
How deep it goes
Works through Python matching, capturing, splitting, and extraction; relates patterns to finite-state machines without developing their mathematics.
Examples
Tests Python greeting patterns, sentence splits, and latitude–longitude extraction from map links and prose.
What you can do after
Build it from scratch: write simple Python patterns for greetings, sentence boundaries, and coordinate pairs while checking where matches fail.

Read how Natural Language Processing in Action, Second Edition explains regular expression →

Tiny Python Projects: Learn coding and testing with puzzles and games

A regular expression is a pattern notation for matching and extracting text according to specified character and sequence rules.

How it is used
Uses declarative patterns to find, validate, split, extract, and replace text in Python programs.
How deep it goes
Descends from character classes and quantifiers to captures, greediness, substitution, and compiled patterns, while leaving advanced regex usage unexplored.
Examples
Uses rhyming words, word scrambling, Mad Libs placeholders, ASCII-word cleaning, workout ranges, and Tic-Tac-Toe boards.
What you can do after
Apply it via Python’s re module to find, capture, validate, split, clean, and replace structured text.

Read how Tiny Python Projects: Learn coding and testing with puzzles and games explains regular expression →

The Well-Grounded Rubyist, Fourth Edition

Regexp is Ruby's built-in class for representing regular expressions and providing operations for constructing and manipulating them.

How it is used
Supports matching, locating, capturing, filtering, and changing text through Ruby pattern-matching operations.
How deep it goes
Works from literals and match results through pattern components, captures, MatchData, interpolation, and escaping, without pursuing regexp string notation in depth.
Examples
Uses short matching expressions, a comma-separated name-and-title record, and an interpolated dot to expose different matching behaviors.
What you can do after
Apply it via Ruby’s matching and string methods to test patterns, extract captures, and escape literal input.

Read how The Well-Grounded Rubyist, Fourth Edition explains regular expression →

Python How-To

A regular expression pattern is a textual specification describing character sequences and structural conditions to be matched in text.

How it is used
Uses patterns to split text with multiple separators and extract valid records from noisy task data.
How deep it goes
Explains pattern syntax, matching methods, raw strings, and an iterative record-extraction workflow without descending into regex engine internals.
Examples
Tests anchors and quantifiers, splits comma-or-underscore data, and filters three-digit task records from unrelated lines.
What you can do after
Apply it via Python’s re module to build, test, and revise patterns for splitting, searching, and extracting text.

Read how Python How-To explains regular expression →

Secrets of the JavaScript Ninja, Second Edition

A pattern for matching character sequences in text.

How it is used
Simplifies JavaScript text checks, extraction, replacement, and browser-facing matching tasks.
How deep it goes
Explains syntax, flags, creation, compilation, and selected pitfalls through examples, without attempting an exhaustive regex tutorial.
Examples
Uses a ZIP-code-shaped check, newline-containing HTML, escaped CSS-selector identifiers, and element class-name searches.
What you can do after
Apply it via JavaScript regex literals or RegExp to check, capture, and replace text while accounting for compilation and matching pitfalls.

Read how Secrets of the JavaScript Ninja, Second Edition explains regular expression →

The Quick Python Book, Fourth Edition

A regular expression is a formal pattern notation for matching and processing text strings.

How it is used
Uses patterns to search, extract, and transform text when fixed-substring searches are too limited.
How deep it goes
Works through compilation, matching, selected metacharacters, raw strings, and substitution; defers the full special-character reference to Python documentation.
Examples
Uses a `hello` line counter, capitalization variants, and a phone-number normalization exercise.
What you can do after
Apply it via Python’s `re` module to search and substitute text, while testing desired matches and nonmatches.

Read how The Quick Python Book, Fourth Edition explains regular expression →

Learn PowerShell in a Month of Lunches: Fourth Edition, Covers Windows, Linux, and macOS

A regular expression is a pattern notation for matching and processing text according to specified character sequences.

How it is used
Applies text patterns to filter, search, and extract information from logs and other administrative text files.
How deep it goes
Explains core syntax and PowerShell operators with runnable examples, but stops short of comprehensive regex complexity.
Examples
Uses character-pattern tests, HTTP error searches, browser-agent searches, event logs, update logs, module data, and IPv4 entries.
What you can do after
Apply regexes via PowerShell -Match and Select-String to test patterns and produce filtered administrative reports.

Read how Learn PowerShell in a Month of Lunches: Fourth Edition, Covers Windows, Linux, and macOS explains regular expression →

Learn Go with Pocket-Sized Projects

A regular expression is a pattern notation for matching and extracting text according to specified character and sequence rules.

How it is used
Uses pattern matching to test randomized HTTP handler output without asserting one specific generated identifier.
How deep it goes
Defines character classes, captures, and submatch extraction through one JSON example, but does not develop regexp syntax broadly.
Examples
Demonstrates extracting an alphanumeric ID from JSON and validating generated IDs with regexp assertions.
What you can do after
Diagnose and test variable text by matching patterns, extracting captures, and normalizing randomized values before comparison.

Read how Learn Go with Pocket-Sized Projects explains regular expression →

Effective Data Analysis

A regular expression is a pattern notation for searching, matching, and extracting text according to specified character or structural criteria.

How it is used
Cleans forecast data retrieved through APIs or web scraping before analysis and aggregation.
How deep it goes
Defines pattern matching and demonstrates numeric extraction, but does not develop regular-expression syntax beyond these weather examples.
Examples
Uses forecast temperatures, sustained wind-speed ranges, mph labels, and API or HTML weather records.
What you can do after
Apply it via Python’s re library to extract numeric values and produce analysis-ready dataframe columns.

Read how Effective Data Analysis explains regular expression →

Practical Automation with PowerShell: Effective scripting from the console to the cloud

A regular expression is a notation for describing sets of strings and matching text against those descriptions.

How it is used
Sanitizes site-request titles into URL-safe strings and extracts KB identifiers during web scraping.
How deep it goes
Breaks down character classes and negation for replacement, then applies a fixed KB pattern without developing broader regex syntax.
Examples
Uses URL cleanup for SharePoint site requests and KB-number extraction from Microsoft Update Catalog link text.
What you can do after
Apply it via PowerShell regex methods to remove disallowed URL characters and extract structured KB identifiers.

Read how Practical Automation with PowerShell: Effective scripting from the console to the cloud explains regular expression →

Pandas Workout: 200 exercises to make you a stronger data analyst

A regular expression is a pattern notation for describing and matching sets of text strings.

How it is used
Uses regular expressions to search, classify, and filter textual values in pandas Series.
How deep it goes
Explains character classes, anchors, word characters, Boolean masks, and preprocessing, but stops short of a general regex syntax survey.
Examples
Demonstrates matching words containing vowels and counting capitalized words after removing surrounding punctuation.
What you can do after
Apply it via pandas str.contains to build text filters and count values matching explicit patterns.

Read how Pandas Workout: 200 exercises to make you a stronger data analyst explains regular expression →

Logs and Telemetry

A regular expression is a pattern language for matching and extracting text according to specified character sequences.

How it is used
Routes and extracts log events for filtering, notification, tenant identification, and parser-driven ingestion.
How deep it goes
Explains tag matching, parser failures, performance, and maintenance risks, but does not develop regex syntax systematically.
Examples
Uses Fluent Bit tag patterns, dummy inputs, JSON output, and deliberately malformed Nginx-style log records.
What you can do after
Apply regex in Fluent Bit configurations while testing malformed input and weighing performance and maintenance costs.

Read how Logs and Telemetry explains regular expression →

Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI

A pattern notation for matching, extracting, or transforming text sequences.

How it is used
Extracts structured machine-learning features from semi-structured rental-listing descriptions.
How deep it goes
Defines pattern matching and demonstrates practical extraction, but does not develop regex syntax comprehensively.
Examples
Uses Tokyo rental strings to extract area, ratings, bedrooms, beds, baths, and accommodation characteristics.
What you can do after
Apply it via Python and pandas to transform text descriptions into numeric, categorical, and binary features.

Read how Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI explains regular expression →

Building Web APIs with ASP.NET Core

A regular expression is a formal pattern notation for matching strings that satisfy specified character and sequencing rules.

How it is used
Validates constrained string inputs in ASP.NET Core request parameters.
How deep it goes
Defines patterns and shows attribute-based matching, but treats regular expressions only to a basic extent.
Examples
Uses ASC|DESC to validate a board-game API sortOrder parameter.
What you can do after
Apply it via the RegularExpression attribute to validate whether endpoint input matches an allowed pattern.

Read how Building Web APIs with ASP.NET Core explains regular expression →

Build Financial Software with Generative AI (From Scratch)

A regular expression is a pattern notation for matching and manipulating text according to specified character and repetition rules.

How it is used
Applies pattern matching to email validation and step-argument parsing in developer workflows.
How deep it goes
Shows generated validation and named captures, but stops short of teaching regex syntax or matching-engine internals.
Examples
Uses a Perl email-validation one-liner and regex-based ACH filename capture in step definitions.
What you can do after
Evaluate generated regex code, validate an email example, and simplify captured-string parsing when direct parsing is clearer.

Read how Build Financial Software with Generative AI (From Scratch) explains regular expression →

Spring Security in Action, Second Edition

A regular expression is a pattern notation for matching character sequences and strings according to specified textual rules.

How it is used
Applies fine-grained endpoint authorization when path expressions cannot capture the required request format.
How deep it goes
Demonstrates matcher configuration and request outcomes, while deferring comprehensive regex syntax and recommending further study.
Examples
Uses email-domain filtering and country-language video authorization with curl requests and Java security configuration.
What you can do after
Apply regex authorization through Spring Security request matchers and test allowed or rejected endpoint requests.

Read how Spring Security in Action, Second Edition explains regular expression →

Deep Learning with R, Third Edition

A regular expression is a pattern notation for matching and manipulating sequences of characters.

How it is used
Uses regular expressions to split text into character- or word-level tokens for numeric text representations.
How deep it goes
Defines flexible pattern matching and demonstrates \\S, but defers systematic regex instruction to external references.
Examples
Demonstrates splitting a sentence into characters, words, punctuation, and vocabulary indices.
What you can do after
Apply it via stringr to retain non-whitespace tokens and punctuation while splitting text.

Read how Deep Learning with R, Third Edition explains regular expression →

100 C++ Mistakes and How to Avoid Them

A regular expression is a formal pattern specification for recognizing, extracting, or substituting portions of text.

How it is used
Replaces fragile hand-written text parsers with declarative pattern matching for everyday C++ text handling.
How deep it goes
Defines state-machine matching and explains pattern components, raw strings, and email validation, without detailing broader regex syntax.
Examples
Uses a buggy hand-coded email validator, a std::regex email pattern, and ordinary versus raw-string backslash representations.
What you can do after
Apply std::regex patterns to validate structured text and reduce maintenance-prone parsing code.

Read how 100 C++ Mistakes and How to Avoid Them explains regular expression →

BDD in Action, Second Edition

A regular expression is a pattern notation for matching and extracting text according to specified character and repetition rules.

How it is used
Matches and extracts parameters from Cucumber scenarios when implementing automated acceptance-test step definitions.
How deep it goes
Explains anchors, capture groups, wildcards, character classes, alternatives, optional characters, and non-capturing groups with examples.
Examples
Uses frequent-flyer statuses, point totals, pronoun variants, registration wording, and ISO-formatted dates.
What you can do after
Apply regular expressions to implement reusable Cucumber step definitions with constrained and captured parameters.

Read how BDD in Action, Second Edition explains regular expression →

Data Analysis with LLMs

A regular expression is a pattern notation for matching and extracting substrings from text.

How it is used
Extracts structured table or SQL content from language-model responses and searches tagged image filenames.
How deep it goes
Demonstrates pattern matching, re.findall, and re.DOTALL, but leaves missing-match robustness as a follow-up concern.
Examples
Uses table markers, SQL code fences, multiline queries, and tagged image filenames as concrete matching targets.
What you can do after
Apply it via Python's re.findall and re.DOTALL to extract marked content before parsing rows, cells, or queries.

Read how Data Analysis with LLMs explains regular expression →

Deep Learning with Python, Third Edition

A pattern language for matching and manipulating character sequences in text.

How it is used
Supports text preprocessing by splitting strings into character, word, and punctuation tokens before modeling.
How deep it goes
Explains matching patterns through working splitting examples, then stops before detailed regex syntax or engine internals.
Examples
Uses character matching, word-and-punctuation matching, and the sentence “The quick brown fox jumped over the dog.”
What you can do after
Apply via a regex library to split strings into character or word tokens for subsequent numeric indexing.

Read how Deep Learning with Python, Third Edition explains regular expression →

Build a Reasoning Model (From Scratch)

A pattern-matching technique for searching and extracting text using formal expression syntax.

How it is used
Extracts numeric answer candidates from model responses when boxed-answer parsing finds no usable result.
How deep it goes
Defines regex as pattern search and applies one numeric pattern, without explaining regex syntax in detail.
Examples
Demonstrates fractions, boxed candidates, missing boxes, whitespace, punctuation, and final-number selection.
What you can do after
Apply it via Python’s re library to find numeric fallback candidates in generated answer text.

Read how Build a Reasoning Model (From Scratch) explains regular expression →

Julia as a Second Language

A regular expression is a pattern language for specifying text sequences to search for or match.

How it is used
Uses miniature patterns to search, match, and selectively replace text in Julia strings.
How deep it goes
Defines literals, character classes, quantifiers, matching, substitution, and captures, while limiting syntax to an overview.
Examples
Demonstrates renaming Rocket selectively, matching structured words and numbers, and extracting named hour and minute fields.
What you can do after
Apply it via Julia's Regex, match, and replace operations to locate, extract, and selectively substitute text.

Read how Julia as a Second Language explains regular expression →

.NET in Action, Second Edition

A regular expression is a pattern language for matching and processing text according to specified character sequences.

How it is used
Adds optional -x/--regex matching to command-line file search, replacing string.Contains for line searches.
How deep it goes
Identifies the .NET Regex class and IgnoreCase option, but does not explain pattern syntax or matching internals.
Examples
Uses [a-z]+ as a Regex pattern and recommends IgnoreCase for command-line searching.
What you can do after
Apply .NET Regex to search file lines using regular expressions and IgnoreCase.

Read how .NET in Action, Second Edition explains regular expression →

Kotlin in Action, 2E

A regular expression is a pattern language for matching, searching, or transforming text according to character and repetition rules.

How it is used
Applies pattern matching to split strings and parse structured path names.
How deep it goes
Explains wildcard matching, escaping, groups, and Kotlin matching calls, but stops short of broader pattern mechanics.
Examples
Uses dot-or-dash splitting and directory, filename, and extension extraction from a full path.
What you can do after
Apply regular expressions in Kotlin to split strings and extract path components from successful matches.

Read how Kotlin in Action, 2E explains regular expression →

Grokking Web Application Security

A regular expression is a pattern notation for describing permissible characters and their ordering in text.

How it is used
Uses regular expressions to validate web inputs and prevent metacharacters from reaching downstream systems.
How deep it goes
Explains pattern validation, sanitization, backtracking, ReDoS, static analysis, and search-index alternatives.
Examples
Demonstrates Ruby sanitization, email/date/IP validation, ReDoS scenarios, and Flask searches backed by Elasticsearch.
What you can do after
Apply it via validation patterns, keep user-controlled patterns out of server code, and select search indexing for rich queries.

Read how Grokking Web Application Security explains regular expression →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.