Search notes:

System.Text.RegularExpressions.Regex (class)

The class System.Text.RegularExpressions.Regex is the regular expression engine of .NET.

(Public) fields, properties and methods

CacheSize
CompileToAssembly()
Escape()
GetGroupNames()
GetGroupNumbers()
GroupNameFromNumber()
GroupNumberFromName()
InfiniteMatchTimeout
InitializeReferences()
IsMatch()
Match() Returns a System.Text.RegularExpressions.Match object. Some overloads of Match() are static.
Matches() Returns a System.Text.RegularExpressions.MatchCollection object.
MatchTimeout
Options Returns a System.Text.RegularExpressions.RegexOptions enum.
Replace() Replaces a regexp-pattern with a string. Some overloads of Replace() are static.
RightToLeft
Split()
ToString()
Unescape()

PowerShell

PowerShell has its own type accelerator for this type: [regex].
$matches = [regex]::match('  one two three ', '((\w+) +(\w+) +(\w+))')

"Matched string starts at position $($matches.Index) and has $($matches.Length) characters"

"  1st group: $($matches.Groups[2].value)"
"  2nd group: $($matches.Groups[3].value)"
"  3rd group: $($matches.Groups[4].value)"

#
#  Matched string starts at position 2 and has 13 characters
#    1st group: one
#    2nd group: two
#    3rd group: three
Github repository .NET-API, path: /System/Text/RegularExpressions/Regex/script.ps1

Poor man's attempt at finding SQL table names in an SQL file

[string] $file = [IO.File]::ReadAllText('c:\users\rene\x.sql')
$re = [regex] '(?ism)(from|join)\s+(\S+)'

$tables = [regex]::Matches($file, $re)

foreach ($table in $tables) {
   "$($table.groups[2].value)"
}

Index