Skip to content

Commit

Permalink
ResponsibleParty: fix up regular expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
jshholland committed Jan 30, 2025
1 parent a5857e7 commit c28a70d
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,17 @@ private ResponsibleParty(

@JsonIgnore
public boolean isOrcid() {
return nameIdentifier.matches("^http(|s)://orcid.org/\\d{4}-\\d{4}-\\d{4}-\\d{3}(X|\\d)$");
return nameIdentifier.matches("^https?://orcid\\.org/\\d{4}-\\d{4}-\\d{4}-\\d{3}(X|\\d)$");
}

@JsonIgnore
public boolean isIsni() {
return nameIdentifier.matches("^https://isni.org/isni/\\d{15}(X|\\d)$");
return nameIdentifier.matches("^https://isni\\.org/isni/\\d{15}(X|\\d)$");
}

@JsonIgnore
public boolean isRor() {
return organisationIdentifier.matches("^https://ror.org/\\w{8,10}$");
return organisationIdentifier.matches("^https://ror\\.org/\\w{8,10}$");
}

public String getRoleDisplayName() {
Expand Down

0 comments on commit c28a70d

Please sign in to comment.