Home
Softono
regex-for-regular-folk

regex-for-regular-folk

Open source JavaScript
290
Stars
22
Forks
23
Issues
4
Watchers
3 years
Last Commit

About regex-for-regular-folk

Regular Expressions for Regular Folk is an experimental, open-source digital book designed to make learning regular expressions accessible to beginners with basic programming knowledge. Unlike traditional resources that rely heavily on theory, this resource adopts a visual and example-based approach to illustrate common regex patterns and highlight frequent pitfalls or gotchas. It focuses on foundational concepts and practical usage rather than advanced topics like engine backtracking or recursive expressions. The project is built using GatsbyJS and MDX, ensuring a modern and interactive reading experience. It is available as a web application for online reading and includes a print-friendly single-page version optimized for generating physical copies or PDFs with proper background graphics support. The content is open for community contributions, including translations into various languages, and is licensed under CC BY-SA 4.0 for chapter content. The project has been translated into Chinese and welcomes fur

Platforms

Web Self-hosted

Languages

JavaScript

Regular Expressions for Regular Folk

Node CI Latest Version

This is an experimental “book” about regular expressions. It is largely visual and example-based, as opposed to most regex resources I found while I was learning. I also attempted to choose test cases that highlight some common gotchas. I think it’ll be worth your time.

Screenshot from /chapters/escapes

This book’s intended audience is regex beginners. Some programming experience is assumed. It does not go into advanced regex concepts like engine backtracking and recursive regexes—at least not at the moment.

This is also an open source project, and contributions are welcome.

Read it online.

Translations

Translations are welcome, as long as they adhere to the license.

You can choose to publish your translation separately, but we welcome translations on here too!

Printing

A single-page version of the book is available. Print it ordinarily. Make sure to enable “Print Background Colors” on Firefox and “Background graphics” (under “More settings”) on Chrome.

Releases

Check the releases tab for a list of releases. A PDF version of each release—book.pdf—is present under “Assets”.

Built With

Acknowledgements

Thanks to all contributors for creating issues, sharing feedback, and creating pull requests!

I referred to RegExr and its community patterns—great resources. I also borrowed some examples from the iHateRegex collection.

Contributing

Thanks for taking the initiative to contribute to REFRF! 🎉

Please check our Contribution Guide for more information.

License

Chapter content (chapters/*) is licensed under CC BY-SA 4.0.

The source code for the website is licensed under the MIT License


Cover