URL_STANDARD_STR

Constant URL_STANDARD_STR 

Source
pub const URL_STANDARD_STR: &str = "(?:https?|ftps?|ftp)://(?:\\[[0-9a-fA-F:%.\\-a-zA-Z]+\\]|[^\\s<>\\[\\]()\\\\\'\\\"`/]+)(?::\\d+)?(?:/[^\\s<>\\[\\]\\\\\'\\\"`]*)?(?:\\?[^\\s<>\\[\\]\\\\\'\\\"`]*)?(?:#[^\\s<>\\[\\]\\\\\'\\\"`]*)?";
Expand description

Pattern for standard HTTP(S)/FTP(S) URLs with full path support.

Use this for bare URL detection where you need the complete URL including Wikipedia-style parentheses in paths. Trailing punctuation like ,;.!? may be captured and should be trimmed by the caller.

ยงExamples

  • https://example.com/path_(with_parens)?query#fragment
  • https://en.wikipedia.org/wiki/Rust_(programming_language)