Skip to content

Commit

Permalink
update regex pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
BSnelling committed Aug 30, 2024
1 parent 314b30f commit b515134
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/HDRUK/3.0.0.form.json
Original file line number Diff line number Diff line change
Expand Up @@ -1842,5 +1842,5 @@
"location": "omics.platform"
}
],
"url_regex": "(https?:\\/\\/)?([a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,}(:\\d+)?(\\/[^\\s]*)?$"
"url_regex": "^\\s*((https?:\\/\\/)*([a-zA-Z0-9-]+\\.?)+[a-zA-Z]{2,}(:\\d+)?(\\/[^\\s]*)?(\n)?)+$"
}
2 changes: 1 addition & 1 deletion hdr_schemata/utils/create_markdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def remove_types(data):

form = {}
form["schema_fields"] = []
form["url_regex"] = "(https?:\/\/)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}(:\d+)?(\/[^\s]*)?$"
form["url_regex"] = "^\s*((https?:\/\/)*([a-zA-Z0-9-]+\.?)+[a-zA-Z]{2,}(:\d+)?(\/[^\s]*)?(\n)?)+$"
form_structure(structure, form)
with open(f"{path}/{name}.form.json", "w") as f:
json.dump(form, f, indent=6)
Expand Down

0 comments on commit b515134

Please sign in to comment.