This course is about lining up text in columns, and searching and rewriting it with regular expressions. On ASCII text, patterns read almost as in Python; the slips are around them, and most still print something plausible. Along the way, you’ll port a payments team’s Friday release-notes script.
Here’s a first taste. The team lead’s Python script prints the week’s release notes: the tag, one line per ticket commit, then the other commits:
Release payments-2026.11.06
06/11 PAY-2330 Payout report totals off by a cent 0d9a6c3
04/11 PAY-2317 Add the SEPA mandate to receipts c2d4a61
03/11 PAY-2304 Retry failed card payments 3ab08d2
02/11 PAY-2291 Show refunds in their own currency 9c1e4b7
Other commits:
e8b2f13 Revert "PAY-2288: Cache exchange rates"
mentions PAY-2288
7e3f5b8 Bump stripe from 14.2.0 to 14.3.0
51f7e90 Merge branch 'fix/pay-2304-retry-payments'
mentions PAY-2304
A line-by-line JavaScript port runs without an error, and prints one ticket line more:
Release payments-2026.11.06
06/11 PAY-2330 Payout report totals off by a cent 0d9a6c3
05/11 PAY-2288 Cache exchange rates" e8b2f13
04/11 PAY-2317 Add the SEPA mandate to receipts c2d4a61
03/11 PAY-2304 Retry failed card payments 3ab08d2
02/11 PAY-2291 Show refunds in their own currency 9c1e4b7
Other commits:
7e3f5b8 Bump stripe from 14.2.0 to 14.3.0
51f7e90 Merge branch 'fix/pay-2304-retry-payments'
mentions PAY-2304
It announces PAY-2288, closing quote and all, from the commit that reverted it. And under “Other commits:”, the revert and its mention are missing.
Each Friday, the team lead runs the script on the week’s git log and posts its notes in the team chat. The port’s notes would announce a change that was taken back. The team’s tools now run on JavaScript, so the script is moving there too.
By the end of this course, you’ll be able to:
- Line up columns without Python’s format specs
- Test text against a pattern, and build patterns from a variable
- Pull out matches and named groups, from one line or a whole log
- Tidy and rewrite text with regex replacements
- Port the whole release-notes script to JavaScript
You need to know Python’s format specs, such as :02d and :<36, and its re module: match(),
finditer(), named groups and sub(). In JavaScript, you need to know template literals,
Intl.NumberFormat, and string methods such as slice(), replace() and split(). Any current
version of Node and Python will do: the examples use Node 26 and Python 3.15.
The course mixes videos with text lessons and exercises, and every video has a summary below it. A quiz and a summary close the course.
Next, in the text lesson Padding Columns With padStart() and padEnd(), you’ll pad the release tag and the ticket titles.