Skip to content

YA Regex that breaks syntax highlighting #75

@lipkau

Description

@lipkau

Description

I have the following line of code in my script:

[ValidatePattern('(?=^.{1,254}$)(^(?:(?!\d+\.)[a-zA-Z0-9_\-]{1,63}\.?)+(?:[a-zA-Z]{2,})$)')]

Here is how it looks in VSCode:

image

Environment

PS C:\> code -v
1.22.1
950b8b0d37a9b7061b6f0d291837ccc4015f5ecdx64

PS C:\> $pseditor.EditorServicesVersion

Major  Minor  Build  Revision
-----  -----  -----  --------
1      6      0      0

PS C:\> code --list-extensions --show-versions
[...]
ms-vscode.PowerShell@1.6.0
[...]

PS C:\> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      6.0.1
PSEdition                      Core
GitCommitId                    v6.0.1
OS                             Microsoft Windows 10.0.14393
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions