Skip to content

Complicated regex in ValidatePattern breaks the grammar #132

Closed
@vors

Description

@vors
Function Get-Domain
{
    [CmdletBinding()]
    param(
        [ValidatePattern('^(?=^.{1,254}$)(^(?:(?!\d+\.)[a-zA-Z0-9_\-]{1,63}\.?)+(?:[a-zA-Z]{2,})$)')]
        [Parameter(ValueFromPipeline = $true)] # this line should not be highlighted as a string
        [string]$domain
    )
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions