Time to Use Regular Expressions More, Um, Regularly by Mark Minasi

Share this & earn $10
PowerShell.org
Published at : 19 Jan 2021
2693 views
40
2

Text data is a pain. Whether it's checking files for SSNs, verifying that a password is complex enough, or updating every page in your web site, text is a pain. Now, you probably know that "regular expressions" could help, but aren't they really hard? Well, not if Mark Minasi's explaining them.
Is that a valid email address, or just a SQL injection attack? Does that folder full of Word files contain any credit card or bank routing numbers? Does that proposed password meet our requirements? How can I easily extract just a few important bits of weather data from a page full of raw HTML? If you've been coding or scripting for any time at all, then you already know the answer -- "regular expressions" or "regexes." But if you're like most of us, regex is one of those "I'll get around to it one day" things, and while "\d=digit, \s=white space, etc" is relatively easy to learn, regex soon becomes essentially opaque. ("Isn't that line noise?" is the one of the more polite observations one hears.)
In this "medium-deep dive," award-winning author, teacher and veteran of more text processing debacles than he prefers to remember Mark Minasi shines a light on how regex works and offers tips on how to get the best out of it. In this session, you'll learn a minimum of regex, which then enables us to get an in-depth knowledge of how the regex "engine" works -- knowledge which is the key to getting anything done in regex. Then you'll see how PowerShell's regex engine -- which is really .NET's regex engine -- can be configured and how it behaves differently from other regex engines. (It's astounding how easily you can build an infinite loop with regex, so you're REALLY going to want to know how to set up regex timeouts.) With that out of the way, we'll then cover regex syntax with lots and lots of examples, as well as some nice regex prototyping tools.
Very few tools in the computing business are as old as regex or as cross-platform, and yet in the domain of text processing virtually nothing exceeds regex's power. It would, then, be a terrible shame if you didn't have some familiarity with this old friend. In short, attend this session because Mark "sed" so!
Now and then, I get the itch to find something that's been around FOREVER, that everyone really, really OUGHT to know -- and they know it, back in that awful "stuff I really should learn one of these days" list we all have -- and make it useful and understandable.
powershellwindows powershelltechsession

Brock Lesnar is surprised by the return of The Undertaker: Raw, Feb. 24, 2014

Brock Lesnar is surprised by the return of The Undertaker: Raw, Feb. 24, 2014

DON'T TAKE DAMAGE! (MINECRAFT CHALLENGE)

DON'T TAKE DAMAGE! (MINECRAFT CHALLENGE)

Will Matched Betting Still Be Worth It in 2021?

Will Matched Betting Still Be Worth It in 2021?

Complement System Made Easy- Immunology- Classical Alternate & Lectin pathway

Complement System Made Easy- Immunology- Classical Alternate & Lectin pathway

Fallapalooza: $2000 Fall Guys Duos Tourney - Quarterfinals

Fallapalooza: $2000 Fall Guys Duos Tourney - Quarterfinals

Learning Thursdays: Year in Ethics: Mandated Reporting

Learning Thursdays: Year in Ethics: Mandated Reporting

🔵 Moreover Furthermore Explanation Syntax Grammar Moreover Furthermore Linkers

🔵 Moreover Furthermore Explanation Syntax Grammar Moreover Furthermore Linkers

BANKS - Till Now (Visualizer)

BANKS - Till Now (Visualizer)

Hampers | Gift Hamper | How To Make Hamper At Home | Tray Hamper Packing | TUTORIAL

Hampers | Gift Hamper | How To Make Hamper At Home | Tray Hamper Packing | TUTORIAL

why I quit chess

why I quit chess

Epsilon Delta Definition of Limit...detailed explanation in Hindi

Epsilon Delta Definition of Limit...detailed explanation in Hindi

Specialised S-Works Epic Evo - Shimano XTR - Dream - Build - Cycles of Life

Specialised S-Works Epic Evo - Shimano XTR - Dream - Build - Cycles of Life

PICK A CARD ~ WHAT'S HAPPENING, CURRENT FEELINGS /WHERE IT'S HEADED/OUTCOME/ +CHARM MSG ❤️ TIMELESS

PICK A CARD ~ WHAT'S HAPPENING, CURRENT FEELINGS /WHERE IT'S HEADED/OUTCOME/ +CHARM MSG ❤️ TIMELESS

Obsessed (2009) - Battle to be Queen Bee Scene (8/9) | Movieclips

Obsessed (2009) - Battle to be Queen Bee Scene (8/9) | Movieclips

Develop A Sense of Humor

Develop A Sense of Humor

Vaccine distribution will be an 'enormous logistical problem': David Rubenstein

Vaccine distribution will be an 'enormous logistical problem': David Rubenstein

GROSS AND NET EARNINGS

GROSS AND NET EARNINGS

Lane 8 - Stir Me Up

Lane 8 - Stir Me Up

Bachman Turner Overdrive - LOOKIN' OUT FOR NO.1

Bachman Turner Overdrive - LOOKIN' OUT FOR NO.1

Senator Will Challenge Election Results; Dueling Electors Process To Be Triggered | Facts Matter

Senator Will Challenge Election Results; Dueling Electors Process To Be Triggered | Facts Matter

The Imminent Immanent Trailer | SGIFF 2018

The Imminent Immanent Trailer | SGIFF 2018

Smurfs: The Lost Village (2017) - I'm a Lady Scene (10/10) | Movieclips

Smurfs: The Lost Village (2017) - I'm a Lady Scene (10/10) | Movieclips

LIKE THIS? Complete the MOST DIFFICULT level on the WEAKEST TANK! Tank Hero

LIKE THIS? Complete the MOST DIFFICULT level on the WEAKEST TANK! Tank Hero

Fugou Keiji Balance [AMV] BAD GUY

Fugou Keiji Balance [AMV] BAD GUY

Schindlers List   How on Earth could it possibly be worse

Schindlers List How on Earth could it possibly be worse

Reside Tik Tok Videolar

Reside Tik Tok Videolar

DADDY OWEN - VANITY (OFFICIAL VIDEO)

DADDY OWEN - VANITY (OFFICIAL VIDEO)

NaVi vs FURIA - IEM Global Challenge - HIGHLIGHTS | CSGO

NaVi vs FURIA - IEM Global Challenge - HIGHLIGHTS | CSGO

What is Bodily Injury Liability Coverage? - GEICO

What is Bodily Injury Liability Coverage? - GEICO

Exploring The Hotel Before We Check Out, Grab and Go Breakfast & Our Disney Store Haul!

Exploring The Hotel Before We Check Out, Grab and Go Breakfast & Our Disney Store Haul!

THE FIRST MAN TO MIMIC WILLIAM RUTO PERFECTLY

THE FIRST MAN TO MIMIC WILLIAM RUTO PERFECTLY

ARNAQUE à l'Assurance vie

ARNAQUE à l'Assurance vie

Ben Discusses The Warmer Box

Ben Discusses The Warmer Box

See All Open Sight review

See All Open Sight review

Mixing Random Things into Slime !!! Slimesmoothie Relaxing Satisfying Slime Videos #2

Mixing Random Things into Slime !!! Slimesmoothie Relaxing Satisfying Slime Videos #2

An Audience With Billy Connolly

An Audience With Billy Connolly

My Personal Setup from 2020

My Personal Setup from 2020

#2 Fragile Dreams - To all people

#2 Fragile Dreams - To all people

My Little Pony: Friendship is Magic (MLP:FiM) // A True True Friend - Human Version (UNFINISHED)

My Little Pony: Friendship is Magic (MLP:FiM) // A True True Friend - Human Version (UNFINISHED)

CUSTOMISED A CAR FOR SHEIKH RASHID !!!!

CUSTOMISED A CAR FOR SHEIKH RASHID !!!!

House Protected From Cell Tower Radiation

House Protected From Cell Tower Radiation

Janardan Sharma (Leader, Nepal Communist Party) - Fireside | 30 November 2020

Janardan Sharma (Leader, Nepal Communist Party) - Fireside | 30 November 2020

Real Way To Live Life | Youth For Youth | M.B

Real Way To Live Life | Youth For Youth | M.B

Tour of St. Anthony Catholic Church - Elements & Vessels

Tour of St. Anthony Catholic Church - Elements & Vessels

Who's Most Likely To? *EXPOSED* ft @The Taneeshow @Dev Raiyani @Tarini Shah

Who's Most Likely To? *EXPOSED* ft @The Taneeshow @Dev Raiyani @Tarini Shah

Citizen Kain & Kiko - Through And Through (Original Mix) [Suara]

Citizen Kain & Kiko - Through And Through (Original Mix) [Suara]

Jock vs Nerd / 15 Funny Ways to Avoid a Fight

Jock vs Nerd / 15 Funny Ways to Avoid a Fight

The Seven Habits of a Godly Life – Dr. Charles Stanley

The Seven Habits of a Godly Life – Dr. Charles Stanley

Where Apparel Retailers Make the Largest Profit | CNBC

Where Apparel Retailers Make the Largest Profit | CNBC