Difficulty: beginner
Estimated Time: 2 minutes

Welcome to your first PowerShell Katacoda Scenario!

You've completed your first PowerShell Katacoda scenario!

Working with String Scanner

Step 1 - Install, Load and try the module

This is your first step.

Tasks

Install-Module PSStringScanner -force

Import the PSStringScanner module

Import-Module PSStringScanner -force

Try it out

"123 456 789".Scan('\d+')

Create a scanner

$scanner = New-PSStringScanner "The quick brown fox"

What can be done?

$scanner | Get-Member

Let's Scan

$scanner.Scan("\w+")

Once more

$scanner.Scan("\w+")

Finally, loop

$scanner.Reset()

while(!$scanner.EoS()) {$scanner.Scan('\w+')}