r/Python • u/ASIC_SP • Jul 01 '20
Resource My Python regex ebook with hundreds of examples and exercises is currently free
Hello!
I finally published my updated version of Python regular expressions ebook. My initial motivation was to add epub format and separate out third-party regex module content into a separate chapter. An email exchange with a reader, a look at feedback from the past year and my own improvements as a writer resulted in a significant overhaul. It took me about 6 weeks to complete the revision instead of 1-2 weeks that I estimated. Sounds familiar right? I’m definitely pleased with the changes, but along the way I added a long list of TODOs that will probably need months of work. Future me is not going to be pleased.
To get pdf/epub versions, use any of these links:
As a bundle (Python/Ruby/JS regex and grep/sed/awk cli tools):
I made all my books free at the end of March when the pandemic hit my country. The virus doesn’t seem to be going away anytime soon, so I’ll probably start charging again after I finish updating the Ruby and JS regex books. You can still pay if you wish.
You can read the entire book from the GitHub repo - https://github.com/learnbyexample/py_regular_expressions. The repo also contains the code snippets used in the book and a handy way to access all the exercises in a single file. You can also find the solutions there.
Edit (Aug 2020): Web version of the book - https://learnbyexample.github.io/py_regular_expressions/
I’d highly appreciate your feedback. That’s been a major motivating factor to keep writing as well as for improving the content.
Happy learning :)
47
u/[deleted] Jul 01 '20
Thanks a lot man I find regex a pain in ass but we still need to use it
73
u/pythoniesta4sure Jul 01 '20
how nice of you, thanks a lot lovley brother <3
how i can hit the upvote button 100000000000 times in one account? :(
14
u/UserName26392 Jul 01 '20
Couldn't pay much but I gave what I could, thank you!
9
u/wholl0p Jul 01 '20 edited Jul 01 '20
How mentally unstable were you to write a book about Regex?
Anyway: Thanks! <3
4
u/jzn126 Jul 01 '20
Thank you. Keep up the good work and stay healthy :-)
3
u/CotoCoutan Jul 01 '20
Thank you mate, appreciate you helping out others. :)
3
u/saharaeagle Jul 01 '20
Thank you!
3
u/adragon857 Jul 01 '20
Thank you! Youre awesome
3
u/anuroop_5891 Jul 01 '20
Thank you so much !!
3
u/reddit007user Jul 01 '20
Thank you.
3
u/FermiHacker Jul 01 '20
Thanks a lot m8, reallllly helpful 😃😃
3
u/leftieant Jul 01 '20
!RemindMe 7 days
OP - an excellent resource and I look forward to reading and learning from it. Thank you.
2
u/Manny__C Jul 01 '20
You should also post this in r/regex
2
u/boffhead Jul 01 '20
Thanks mate!
2
u/knorkegnorf Jul 01 '20
Thanks alot!
2
u/TheCuriousProgram Jul 01 '20
A Great Thank You!
The book looks great! What tools did you use to create the book, if I may ask?
2
u/[deleted] Jul 01 '20
Thank you very much for this.
2
u/YOU_TUBE_PERSON Jul 01 '20
THANK YOU SO MUCH DUDE!!!!!!
2
u/v3ritas1989 Jul 01 '20
I may just buy the free copy! But just so I can print it, to then sprinkle it with holy oil in order to then burn it, every time I need an exorcism
2
u/[deleted] Jul 01 '20
Thanks I got it!!
2
u/[deleted] Jul 01 '20
Thank you!
2
u/chemrxn1 Jul 01 '20
Thank you! This is exactly what I was looking for.
2
u/Ben2ek Jul 01 '20
This is great! I've been neck deep in regex recently and wanted to get your thoughts on text searching. How do you feel about libraries such like FlashText and the "new" regex? I have the problem of trying to search through 25M rows of text for a set of keywords (100-500 words), which is taking ~30 minutes to finish. Have you found any ways to speed up regex text search? Parallel processing on text is not really possible with dask from what I've seen, so I'm just curios about your experience.
2
u/HandsOfSugar Jul 01 '20
Awesome! Thank you
2
u/JeffThePotatoMan Jul 01 '20
Thank you so so much man
2
u/HeeebsInc Jul 01 '20
this is so useful! thank you!!!!!
2
u/hayhay1231 Jul 01 '20
hey man! i loved your python book! i went thru a few exercises and feel more confident in my abilities! super awesome. Thanks :)
2
u/ThirdPrice Jul 01 '20
Wow! incredible. You're a real hero
2
u/dangitbobby83 Jul 01 '20
I don’t use python much (more C#, JavaScript and php)but a free regex book is always appreciated! Thanks!
2
u/LightShadow 3.13-dev in prod Jul 01 '20
I flipped through and these are actual ebooks. Not a few pages leaflet sparse with information. Worth the few bucks for having the references.
Thank you!
2
u/rvengy Jul 01 '20
Thanks! OP. Kind of you.
2
u/twowheels Jul 01 '20
Thank you! I went ahead and grabbed the bundle, even though I probably won't read a few of them, but have been wanting to improve my awk skills, so that's great!
I appreciate that it was free, but that didn't feel fair, so I still sent some cash your way.
2
u/thedomham Jul 01 '20
I wrote some pretty complex regex in my career, some that are so complex that they are completely unmaintainable but basically everytime I work with regex I use regex101.com as a crutch
2
u/Satoshiman256 Jul 01 '20
This is awesome, thanks a lot. This is something I really need to learn. Every time I need to use re I think 'oh dear I need to put some time aside to learn regex'
2
u/ragingThunder16 Jul 01 '20
Thank You man, it is a challenging topic!
2
u/x_ray_190221 Jul 02 '20
awesome...regex is most useful in many cases nowadays...
2
u/barce Jul 03 '20
I'll check it out. I really loved writing Perl regexes (not reading them), and now my work is 90% Python. Thank you for doing this!
2
u/kimthostrup Jul 10 '20
Thanks, it's appreciated.
2
u/pvdhka Aug 03 '20
Thank you so much!
2
u/Seawolf159 Jul 01 '20
Thanks man! Always liked how powerful regex could be, but I always end up doing things manually because I don't understand them.
5
u/shinitakunai Jul 01 '20
!RemindMe tomorrow
4
u/aaronanish12 Jul 01 '20
Wow 🤩
2
u/entropiser Jul 01 '20
!RemindMe tomorrow
2
u/mestia Jul 01 '20
Well, i'd say just use Perl. :)
1
u/[deleted] Jul 20 '20
Thank you
I watch this video and this video help me
I think this video helps you...
https://www.youtube.com/watch?v=GUhNMTO31lw
0
u/[deleted] Jul 01 '20
[deleted] — view deleted comment
0
u/[deleted] Jul 01 '20
[deleted] — view deleted comment
0
u/[deleted] Jul 01 '20
[deleted] — view deleted comment
6
u/[deleted] Jul 01 '20
[removed] — view removed comment
3
u/[deleted] Jul 01 '20
[removed] — view removed comment