This blog post gives an overview and examples of regular expression syntax as implemented by the re
built-in module (Python 3.13+). Assume ASCII character set unless otherwise specified. This post is an excerpt from my Understanding Python re(gex)? book.
Visualization created using debuggex for the pattern r'\bpar(en|ro)?t\b'
Either you've already heard of pandoc
or if you have searched online for markdown
to pdf
or similar, you are sure to come across pandoc
. This tutorial will help you use pandoc
to generate pdf
and epub
versions from a GitHub style markdown file.
The main motivation for this blog post is to highlight the customizations I used for self-publishing my ebooks. It wasn't easy to arrive at the setup I ended up with, so I hope this will be useful for those looking to use pandoc
for such a purpose. This guide is specifically aimed at technical books that has code snippets.
Poster created using Canva
The command name sed
is derived from stream editor. The most commonly used editing command is substitution, for which various examples are shown in this blog post.
The examples presented here have been tested with
GNU sed
. Syntax and features might differ for other implementations.
Hello!
I am pleased to announce a new version of my CLI text processing with GNU awk ebook.
Learn the GNU awk
command step-by-step from beginner to advanced levels with hundreds of examples and exercises. This book will dive deep into field processing, show examples for filtering features, multiple file processing, how to construct solutions that depend on multiple records, how to compare records and fields between two or more files, how to identify duplicates while maintaining input order and so on. Regular expressions will also be discussed in detail.
Do you find awk
one-liners cryptic? Stuff like !a[$0]++
, 1
, $1=$1
, NR==FNR
and -v RS=
? You'll find examples and brief explanations for such idioms in this post.
The examples presented here have been tested with
GNU awk
. These are likely to work with most other implementations ofawk
as well.
Hello!
I just published a new version of my Understanding Python re(gex)? ebook.
This book will help you learn Python Regular Expressions step-by-step from beginner to advanced levels with hundreds of examples and exercises. The standard library re
as well as the third-party regex
module are covered in this book.
You might already know how to use the --color
option to highlight matched portions with GNU grep
. In this post, you'll see how to use ANSI escape sequences to format matched portions with GNU sed
and GNU awk
.
Hello!
I am pleased to announce a new version of my 100 Page Python Intro ebook. This book is a short, introductory guide for the Python programming language. This book is well suited:
Hello!
Here are some awesome deals for programming books and courses during the 2024 festive season.
Having an interactive program that automatically loads questions and checks the solution is wonderful to have while learning a topic. This TUI app has beginner to intermediate level exercises and multiple-choice questions for Python learners.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4