mirror of
https://github.com/tristanpenman/valijson.git
synced 2025-03-02 20:30:11 +01:00
Ensure that urn regex checks to end of string
This commit is contained in:
parent
eac0859cd8
commit
653d515d32
@ -28,7 +28,7 @@ inline bool isUrn(const std::string &documentUri) {
|
||||
static const std::regex pattern(
|
||||
"^((urn)|(URN)):[a-zA-Z0-9]+[-]{0,1}[a-zA-Z0-9]+(:[-a-zA-Z0-9\\\\._~%!"
|
||||
"$&'()\\/*+,;=]+)+(\\?[-a-zA-Z0-9\\\\._~%!$&'()\\/"
|
||||
"*+,;:=]+){0,1}(#[-a-zA-Z0-9\\\\._~%!$&'()\\/*+,;:=]+){0,1}");
|
||||
"*+,;:=]+){0,1}(#[-a-zA-Z0-9\\\\._~%!$&'()\\/*+,;:=]+){0,1}$");
|
||||
|
||||
return std::regex_match(documentUri, pattern);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user