uri property
URI regex
Examples:
- https://medium.com/@diegoveloper/flutter-widget-size-and-position-b0a9ffed9407
- https://www.youtube.com/watch?v=COYFmbVEH0k
- https://stackoverflow.com/questions/53913192/flutter-change-the-width-of-an-alertdialog/57688555
- http://192.168.0.1:8080
- https://john.doe@www.example.com:123/forum/questions/?tag=networking&order=newest#top
- http://a/b/c/d;p?q
- twitter://
- fb://profile/33138223345
- mailto:John.Doe@example.com
- ldap://
2001:db8::7
/c=GB?objectClass?one - tel:+1-816-555-1212
- telnet://192.0.2.16:80/
- news:comp.infosystems.www.servers.unix
- urn:oasis:names:specification:docbook:dtd:xml:4.1.2
Reference: https://datatracker.ietf.org/doc/html/rfc3986 https://en.wikipedia.org/wiki/Uniform_Resource_Identifier
Implementation
static String uri =
r"^(?!.*[?@!&`()*+,;=_\-~\]\[#$]{2})(?!.*[?@!&`()*+,;=_.\-~:?\[\]]$)(?!.*(\/\.|\.\/))(\w+:(\/\/)?)\S*$";