Process Groovy strings: GStrings, multiline text and regex matching
8 steps · about 3 h 10 min · Beginner
- Groovy String Methods: 15 Examples You Will Use Daily (article, Technoscripts, 20 min)
It starts with the string types and the GDK helper methods, so you know which quote style to reach for.
- The Apache Groovy programming language - Syntax (doc, groovy-lang.org (official), 30 min)
The official spec covers the exact rules for GStrings, triple-quoted strings, slashy strings and dollar-slashy strings.
- Groovy Language Documentation (doc, Apache Groovy, 20 min)
The latest docs add edge cases such as which characters are legal in slashy strings and how GStrings are interpolated.
- Regex Matching — Groovy Fundamentals (tutorial, ShipThatCode, 15 min)
A short lesson that introduces find versus match, capture groups, replacement and regex flags together before the deeper material.
- The Apache Groovy programming language - Operators (doc, groovy-lang.org (official), 20 min)
It defines the pattern, find and match operators precisely, including how a Matcher is treated as a boolean.
- Groovy Regular Expressions - Pattern Matching with Regex (tutorial, ZetCode, 30 min)
Worked examples of Pattern and Matcher, findAll, named groups, replacement and splitting let you practise what the operator docs describe.
- Groovy Regular Expressions - The Definitive Guide (Part 1) (article, printStackTrace blog, 25 min)
Its practical examples of exact matching and slashy-string patterns, such as ticket IDs and version numbers, put the operators to use.
- Groovy Regular Expressions (article, Technoscripts, 30 min)
It moves on to lookaheads, case-insensitive patterns and the (?m) and (?s) flags for processing multiline text.