{"id":17614186,"url":"https://github.com/learnbyexample/ruby_regexp","last_synced_at":"2025-05-06T14:33:01.140Z","repository":{"id":42591036,"uuid":"158166006","full_name":"learnbyexample/Ruby_Regexp","owner":"learnbyexample","description":"Learn Ruby Regexp step-by-step from beginner to advanced levels with plenty of examples and exercises.","archived":false,"fork":false,"pushed_at":"2025-04-21T09:33:14.000Z","size":3738,"stargazers_count":99,"open_issues_count":0,"forks_count":13,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-21T10:33:38.702Z","etag":null,"topics":["ebook","exercises","learning-by-doing","regex","regular-expressions","ruby"],"latest_commit_sha":null,"homepage":"https://learnbyexample.github.io/Ruby_Regexp/","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/learnbyexample.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-11-19T05:20:48.000Z","updated_at":"2025-01-04T20:55:10.000Z","dependencies_parsed_at":"2024-10-23T01:46:51.430Z","dependency_job_id":"9422c579-5814-429d-9e71-803ff55d9b48","html_url":"https://github.com/learnbyexample/Ruby_Regexp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/learnbyexample%2FRuby_Regexp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/learnbyexample%2FRuby_Regexp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/learnbyexample%2FRuby_Regexp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/learnbyexample%2FRuby_Regexp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/learnbyexample","download_url":"https://codeload.github.com/learnbyexample/Ruby_Regexp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252703467,"owners_count":21790891,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ebook","exercises","learning-by-doing","regex","regular-expressions","ruby"],"created_at":"2024-10-22T18:29:12.475Z","updated_at":"2025-05-06T14:33:00.793Z","avatar_url":"https://github.com/learnbyexample.png","language":"Ruby","readme":"# Understanding Ruby Regexp\n\nLearn Ruby Regular Expressions step-by-step from beginner to advanced levels with hundreds of examples and exercises. Visit https://youtu.be/QNsCzVeZH78 for a short video about the book.\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"./images/ruby_regexp_ls.png\" alt=\"Understanding Ruby RegExp ebook cover image\" /\u003e\u003c/p\u003e\n\nThe book also includes exercises to test your understanding, which are presented together as a single file in this repo — [Exercises.md](./exercises/Exercises.md).\n\nFor solutions to the exercises, see [Exercise_solutions.md](./exercises/Exercise_solutions.md).\n\nSee [Version_changes.md](./Version_changes.md) to keep track of changes made to the book.\n\n\u003cbr\u003e\n\n# E-book\n\n* You can download the pdf/epub versions of the book for free using the below links (you can also pay if you wish):\n    * https://learnbyexample.gumroad.com/l/rubyregexp\n    * https://leanpub.com/rubyregexp\n* You can also get the book as part of these bundles:\n    * **All books bundle** bundle from https://learnbyexample.gumroad.com/l/all-books\n        * Includes all my programming books\n    * **Awesome Regex** bundle from https://learnbyexample.gumroad.com/l/regex or https://leanpub.com/b/regex\n    * **Ruby text processing** bundle from https://learnbyexample.gumroad.com/l/ruby-textprocessing or https://leanpub.com/b/ruby-textprocessing\n* See https://learnbyexample.github.io/books/ for a list of other books\n\nFor a preview of the book, see [sample chapters](./sample_chapters/ruby_regexp_sample.pdf).\n\nThe book can also be [viewed as a single markdown file in this repo](./ruby_regexp.md). See my blogpost on [generating pdfs from markdown using pandoc](https://learnbyexample.github.io/customizing-pandoc/) if you are interested in the ebook creation process.\n\nFor the web version of the book, visit https://learnbyexample.github.io/Ruby_Regexp/\n\n\u003cbr\u003e\n\n# Feedback\n\n⚠️ ⚠️ Please DO NOT submit pull requests. Main reason being any modification requires changes in multiple places.\n\nI would highly appreciate it if you'd let me know how you felt about this book. It could be anything from a simple thank you, pointing out a typo, mistakes in code snippets, which aspects of the book worked for you (or didn't!) and so on. Reader feedback is essential and especially so for self-published authors.\n\nYou can reach me via:\n\n* Issue Manager: [https://github.com/learnbyexample/Ruby_Regexp/issues](https://github.com/learnbyexample/Ruby_Regexp/issues)\n* E-mail: `echo 'bGVhcm5ieWV4YW1wbGUubmV0QGdtYWlsLmNvbQo=' | base64 --decode`\n* Twitter: [https://twitter.com/learn_byexample](https://twitter.com/learn_byexample)\n\n\u003cbr\u003e\n\n# Table of Contents\n\n1. Preface\n2. Why is it needed?\n3. Regexp introduction\n4. Anchors\n5. Alternation and Grouping\n6. Escaping metacharacters\n7. Dot metacharacter and Quantifiers\n8. Interlude: Tools for debugging and visualization\n9. Working with matched portions\n10. Character class\n11. Groupings and backreferences\n12. Interlude: Common tasks\n13. Lookarounds\n14. Modifiers\n15. Unicode\n16. Further Reading\n\n\u003cbr\u003e\n\n# Acknowledgements\n\n* [ruby-lang documentation](https://www.ruby-lang.org/en/documentation/) — manuals and tutorials\n* [/r/ruby/](https://old.reddit.com/r/ruby/) and [/r/regex/](https://old.reddit.com/r/regex/) — helpful forum for beginners and experienced programmers alike\n* [stackoverflow](https://stackoverflow.com/) — for getting answers to pertinent questions on Ruby and regular expressions\n* [tex.stackexchange](https://tex.stackexchange.com/) — for help on [pandoc](https://github.com/jgm/pandoc/) and `tex` related questions\n* [canva](https://www.canva.com/) — cover image\n* [Warning](https://commons.wikimedia.org/wiki/File:Warning_icon.svg) and [Info](https://commons.wikimedia.org/wiki/File:Info_icon_002.svg) icons by [Amada44](https://commons.wikimedia.org/wiki/User:Amada44) under public domain\n* [oxipng](https://github.com/shssoichiro/oxipng), [pngquant](https://pngquant.org/) and [svgcleaner](https://github.com/RazrFalcon/svgcleaner) — optimizing images\n* [gmovchan](https://github.com/gmovchan) for spotting a typo\n* **KOTP** for spotting grammatical mistakes\n* [mdBook](https://github.com/rust-lang/mdBook) — for web version of the book\n    * [mdBook-pagetoc](https://github.com/JorelAli/mdBook-pagetoc) — for adding table of contents for each chapter\n    * [minify-html](https://github.com/wilsonzlin/minify-html) — for minifying html files\n\nSpecial thanks to Allen Downey, an attempt at translating his book [Think Python](https://greenteapress.com/wp/think-python-2e/) to [Think Ruby](https://github.com/learnbyexample/ThinkRubyBuild) gave me the confidence to publish my own book.\n\n\u003cbr\u003e\n\n# License\n\nThe book is licensed under a [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-nc-sa/4.0/).\n\nThe code snippets are licensed under MIT, see [LICENSE](./LICENSE) file.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flearnbyexample%2Fruby_regexp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flearnbyexample%2Fruby_regexp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flearnbyexample%2Fruby_regexp/lists"}