Skip to content

Latest commit

 

History

History
48 lines (36 loc) · 1.31 KB

File metadata and controls

48 lines (36 loc) · 1.31 KB

PowerShellVerbalExpressions

PowerShell regular expression made easy using Verbal expressions.

**Note:**This is currently a partial implementation only.

##How to start

Import-Module -Name Poverb

##How To use it Currently the output is only a string that has the regular expression you desire.

API documentation

	Get-RegexFromVerbex -Verbex {
		startofline
		then "http"
		maybe "s"
		then "://"
		maybe "www."
		anythingbut " "
		endofline
	}

the output is:

	'^(?:http)(?:s)?(?:://)(?:www\.)?(?:[^\ ]*)$'

Other implementations

You can view all implementations on VerbalExpressions.github.io

##References

  1. Jim Hollenhorst - The 30 Minute Regex Tutorial
  2. VerbalExpressions.github.io
  3. Peder Søholt
  4. Karl Prosser for writing Invoke-Ternary filter
  5. Doug Finke