ncihtan / data-models

Schema.org Data Models for HTAN
MIT License
14 stars 7 forks source link

Refine validation rule for HTAN filenames #294

Closed adamjtaylor closed 9 months ago

adamjtaylor commented 11 months ago

From Regex 101

/ ^(([a-zA-Z0-9_-.+(\') ]+\/)[a-zA-Z0-9-.+(')]+)$ / gm ^ asserts position at start of a line 1st Capturing Group (([a-zA-Z0-9\-.+(\') ]+\/)[a-zA-Z0-9-.+(')]+) 2nd Capturing Group ([a-zA-Z0-9\-.+(\') ]+\/)*

adamjtaylor commented 10 months ago

Need to confirm synapse and s3 valid characters and list here.

adamjtaylor commented 10 months ago

From S3 docs

The following character sets are generally safe for use in key names.

Alphanumeric characters | 0-9a-zA-Z -- | -- Special characters | Exclamation point (!)Hyphen (-)Underscore (_)Period (.)Asterisk (*)Single quote (')Open parenthesis (()Close parenthesis ())
adamjtaylor commented 10 months ago

Some minimal testing with regex101

Screenshot 2023-10-24 at 11 57 10 AM