Email the Author

You can use this page to email Moritz Lenz about Parsing with Perl 6 Regexes and Grammars.

Please include an email address so the author can respond to your query

This message will be sent to Moritz Lenz

This site is protected by reCAPTCHA and the Google  Privacy Policy and  Terms of Service apply.

About the Book

As humans, we are incredibly good at finding patterns. So we assume that as programmers, we must be good at using patterns to parse text. But it's a skill that needs to be learned. This book aims to teach you how to write good regexes and parsers with Perl 6.

It starts from the very basics of regular expressions, and then explores how they integrate with regular Perl 6 code. The result of a successful regex match is a Match object, which contains all the useful information for extracting data, so that is the next topic.

Then we discuss how regexes work under the hood, and how Perl 6 uses a mixture of finite state machines and backtracking to do its magic. With this understanding, we can explore common techniques for constructing regexes and exploring the data under scrutiny.

So far, the regexes can only match relatively simple formats. But with reusable named regexes and grammars, the sky is the limit. Figuratively, of course. We discuss techniques for code reuse in grammars, and how to write parser for more involved data formats.

One of my favorite topics is the generation of good error messages for when the input can't be parsed by a grammar, so there will be a separate chapter on that.


About the Author

Moritz Lenz’s avatar Moritz Lenz

@nogoodnickleft

Moritz Lenz is a software engineer and architect.

In the Perl community, he is well known for his contributions to the Perl 6 programming language, the Rakudo Perl 6 compiler, related test suite, infrastructure and tools.

At his employer, noris network AG, he introduced Continuous Delivery for many in-house developed applications, and now wants to share his experience with the wider world.

Logo white 96 67 2x

Publish Early, Publish Often

  • Path
  • There are many paths, but the one you're on right now on Leanpub is:
  • Perl6regex › Email Author › New
    • READERS
    • Newsletters
    • Weekly Sale
    • Monthly Sale
    • Store
    • Home
    • Redeem a Token
    • Search
    • Support
    • Leanpub FAQ
    • Leanpub Author FAQ
    • Search our Help Center
    • How to Contact Us
    • FRONTMATTER PODCAST
    • Featured Episode
    • Episode List
    • MEMBERSHIPS
    • Reader Memberships
    • Department Reader Memberships
    • Author Memberships
    • Your Membership
    • COMPANY
    • About
    • About Leanpub
    • Blog
    • Contact
    • Press
    • Essays
    • AI Services
    • Imagine a world...
    • Manifesto
    • More
    • Partner Program
    • Causes
    • Accessibility
    • AUTHORS
    • Write and Publish on Leanpub
    • Create a Book
    • Create a Bundle
    • Create a Course
    • Create a Track
    • Testimonials
    • Why Leanpub
    • Services
    • TranslateAI
    • TranslateWord
    • TranslateEPUB
    • PublishWord
    • Publish on Amazon
    • CourseAI
    • GlobalAuthor
    • Marketing Packages
    • IndexAI
    • Author Newsletter
    • The Leanpub Author Update
    • Author Support
    • Author Help Center
    • Leanpub Authors Forum
    • The Leanpub Manual
    • Supported Languages
    • The LFM Manual
    • Markua Manual
    • API Docs
    • Organizations
    • Learn More
    • Sign Up
    • LEGAL
    • Terms of Service
    • Copyright Policy
    • Privacy Policy
    • Refund Policy

*   *   *

Leanpub is copyright © 2010-2025 Ruboss Technology Corp.
All rights reserved.

This site is protected by reCAPTCHA
and the Google  Privacy Policy and  Terms of Service apply.

Leanpub requires cookies in order to provide you the best experience. Dismiss