Regular Expressions 101

Sponsors

Library entries

0
dotnet

Username regex

Matches alphanumeric, @, . , -
Submitted by Ethan Pedersen - 2 days ago
0
pcre

Intervelead 2 of 5 custas

Intervelead 2 of 5 custas
Submitted by anonymous - 20 days ago
0
pcre

test1

test1
Submitted by anonymous - a month ago

Parse Docker image reference components (URI / tag / name / registry / host)

Vote

0

Regular Expression
javascript

/
^(?<Name>(?<=^)(?:(?<Domain>(?:(?:localhost|[\w-]+(?:\.[\w-]+)+)(?::\d+)?)|[\w]+:\d+)\/)?\/?(?<Namespace>(?:(?:[a-z0-9]+(?:(?:[._]|__|[-]*)[a-z0-9]+)*)\/)*)(?<Repo>[a-z0-9-]+))[:@]?(?<Reference>(?<=:)(?<Tag>[\w][\w.-]{0,127})|(?<=@)(?<Digest>[A-Za-z][A-Za-z0-9]*(?:[-_+.][A-Za-z][A-Za-z0-9]*)*[:][0-9A-Fa-f]{32,}))?
/
gm

Description

Loading markdown...
Submitted by https://github.com/Propolisa - 9 months ago