~/talk

Escape from Planet Regex - Kotlin to the Rescue

Talkat droidcon New York 2025 · 2025-06-25..06-26· [kotlin]
slides:none on file

Crash-landing narrative hides a practical teardown of regular expressions implemented with Kotlin’s Regex class: using Regex class or the string extension, prefer raw strings to avoid double-escaping, pass RegexOption flags (IGNORE_CASE, MULTILINE) and call find/findAll/matches/split/replace rather than a global flag. Demonstrations show MatchResult.group indexing (0 = whole match, 1+ = capture groups), lookarounds for Advent of Code day 3 logic, and a working Kotlin solution that extracts and multiplies the captured numbers.

AI-written summary · about

  1. 0:00Introduction
  2. 3:07Regex basics
  3. 7:16Literal chars and wildcards
  4. 10:23Special chars and escaping
  5. 11:05Occurrence indicators
  6. 13:32Greedy vs lazy matching
  7. 13:53Anchors and flags
  8. 15:38Character sets and ranges
  9. 17:05Negated sets and alternation
  10. 18:47Character classes and groups
  11. 23:04Kotlin Regex class
  12. 24:47Kotlin match functions
  13. 25:51Match results in Kotlin
  14. 26:55Practical Kotlin example
  15. 28:40Advent of Code with Regex
  16. 29:44Lookarounds explained
  17. 33:13Lookbehinds limitations
  18. 33:56Advent of Code part two
  19. 35:44Conclusion and Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.