patterns

package
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 10, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// An SSH command regex where there must be a username@host somewhere present in the command.
	SshCommand = regexp.MustCompile(
		`(^|\s)\bssh\b\s+([^\s]+(\s+|$))+((?P<username>[a-zA-Z0-9_-]+|\$[A-Z_0-9]+)@(?P<host>[a-zA-Z0-9.-]+|\$[A-Z_0-9]+))`,
	)

	// Multiline quoted string
	MultilineQuotedStringCommand = regexp.MustCompile(`\"(.*\\\n.*)+\"`)

	// Az cli command regex
	AzCommand     = regexp.MustCompile(`az\s+([a-z]+)\s+([a-z]+)`)
	AzGroupDelete = regexp.MustCompile(`az group delete`)

	// ARM regex
	AzResourceURI       = regexp.MustCompile(`\"id\": \"(/subscriptions/[^\"]+)\"`)
	AzResourceGroupName = regexp.MustCompile(`resourceGroups/([^\"]+)`)
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL