-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support URI format #129
Support URI format #129
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @sky-2002 👋
Thank you for contributing here! There are couple of issues, which needs to be addressed before we can merge it.
This reverts commit dc14a22.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thank you for contributing @sky-2002 🚀
Adds URI parsing code and tests Refer dottxt-ai#127
Adds URI parsing code and tests Refer dottxt-ai#127
Adds URI parsing code and tests Refer dottxt-ai#127
Adds URI parsing code and tests Refer dottxt-ai#127
Adds URI parsing code and tests Refer dottxt-ai#127
Adds URI parsing code and tests Refer dottxt-ai#127
@@ -34,13 +34,15 @@ pub static DATE_TIME: &str = r#""(-?(?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3 | |||
pub static DATE: &str = r#""(?:\d{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])""#; | |||
pub static TIME: &str = r#""(2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9])(\\.[0-9]+)?(Z)?""#; | |||
pub static UUID: &str = r#""[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}""#; | |||
pub static URI: &str = r#"^(https?|ftp):\/\/([^\s:@]+(:[^\s:@]*)?@)?([a-zA-Z\d.-]+\.[a-zA-Z]{2,}|localhost)(:\d+)?(\/[^\s?#]*)?(\?[^\s#]*)?(#[^\s]*)?$|^urn:[a-zA-Z\d][a-zA-Z\d\-]{0,31}:[^\s]+$"#; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would be curious to see a pointer to the specifications where most of these regexes are defined, as I wouldn't be able to confirm later with my own eyeballs that they're 100% correct!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yvan-sraka I am also searching for specifications where regexes are defined (because same is the case with my eyeballs 👀 )
Adds URI parsing code and tests. Lmk if regex needs to cover other cases (regex credits chatgpt 😅 )
Closes #127
Note: Created separate PR than email format so that no blocking if update/refactor needed