Skip to content

Commit

Permalink
fix: adapt regex to allow instance urls without subdomains
Browse files Browse the repository at this point in the history
  • Loading branch information
tnotheis committed May 16, 2024
1 parent 680c4d4 commit cc98cc2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public static implicit operator IdentityAddress(string stringValue)
return ParseUnsafe(stringValue);
}

[GeneratedRegex($@"^(?<addressWithoutChecksum>did:e:(?<instanceUrl>(?:[a-z0-9]+\.)+[a-z]{{2,}}):dids:(?<identitySpecificPart>[0-9abcdef]{{20}}))(?<checksum>[0-9abcdef]{{{CHECKSUM_LENGTH_S}}})$")]
[GeneratedRegex($@"^(?<addressWithoutChecksum>did:e:(?<instanceUrl>(?:[a-z0-9]+\.)*[a-z]{{2,}}):dids:(?<identitySpecificPart>[0-9a-f]{{20}}))(?<checksum>[0-9a-f]{{{CHECKSUM_LENGTH_S}}})$")]
private static partial Regex IdentityAddressValidatorRegex();

#endregion
Expand Down

0 comments on commit cc98cc2

Please sign in to comment.