Regex in PowerShell: How to grasp it and why you should grasp it
summary
Deep dive into PowerShell regex with concrete outcomes: a single inline pattern captures UK postcodes across seven postcode rules and varied placements, a set of staged regexes replaces inconsistent UTC offsets without corrupting valid +00:00 values thus saved import by avoiding +000 corruption, and an automation extracts SQL/DAX/M block comments into OneNote using a while loop to force non‑greedy extraction plus Regex Match object properties to pull groups for further processing.
AI-written summary · about
chapters (7)
- 0:00Introduction and background
- 2:44The case for learning regex
- 5:53Practical regex use cases
- 9:41Core principles of regex
- 12:29Special characters and syntax
- 17:31Advanced pattern matching
- 20:45Regex strategy and conclusion
related talks
57mRegular Expressions, To Match Or Not, That is the Question
39mRegex-Fu
56mHow I learned to stop worrying and love Regex
01h 37mMore Game Breaking PowerShell
04mThree indispensable REGEX hacks
38mEscape from Planet Regex - Kotlin to the Rescue
59mRegular Expressions
30mPokekYoke Mistake-Proofing your PowerShell scripts and functions
