JavaScript Unicode, Bytes, and Advanced Regular Expressions

Stephen Gruppetta 16 Lessons 2h 27m Updated advanced js py

A JavaScript string’s .length doesn’t count what Python’s len() counts. Port name[:16] as name.slice(0, 16), build a branch name from the ticket title Zoë's 😀 refund fix, and the emoji that Python keeps whole comes out as �, half of it cut away.

In this course, you’ll port a team’s Python helper, which turns ticket titles typed in different languages into git branch names that fit the host’s byte limit, to JavaScript.

By the end of this course, you’ll be able to:

  • Tell code units from code points, and walk a string by code point with for...of and .codePointAt()
  • Compare look-alike text with .normalize(), and count what a reader sees with Intl.Segmenter
  • Encode text to UTF-8 bytes with TextEncoder, and work with Uint8Array views and copies
  • Match Unicode with the u and v flags, look behind and ahead, and scan text with the y flag
  • Rebuild the branch-name helper in JavaScript so it matches the Python’s output

You’ll need Python’s str and bytes, encodings, unicodedata.normalize(), and lookarounds in re, plus Node 26 and the JavaScript you’ve already used: regular expressions with flags and named groups, and iterating with spread and for...of. The Python examples use Python 3.15.

The course mixes short videos and text lessons with exercises, a project video that rebuilds the helper, and a quiz.

What’s Included:

  • 16 Lessons
  • Video Subtitles and Full Transcripts
  • Translated Subtitles in 8 Languages
  • 2 Downloadable Resources
  • Interactive Quiz to Check Your Progress
  • 4 Hands-On Coding Exercises
  • Q&A With JavaScript Experts: Ask a Question
  • Certificate of Completion

Downloadable Resources:

Related Learning Paths:

About Stephen Gruppetta

Stephen obtained a PhD in physics and worked as a physicist in academia for over a decade before becoming a programming educator. He's constantly looking for simple ways to explain complex things.

» More about Stephen

← Browse All Courses