URL_WWW_STR

Constant URL_WWW_STR 

Source
pub const URL_WWW_STR: &str = "www\\.(?:[a-zA-Z0-9][-a-zA-Z0-9]*\\.)+[a-zA-Z]{2,}(?::\\d+)?(?:/[^\\s<>\\[\\]\\\\\'\\\"`]*)?(?:\\?[^\\s<>\\[\\]\\\\\'\\\"`]*)?(?:#[^\\s<>\\[\\]\\\\\'\\\"`]*)?";
Expand description

Pattern for www URLs without protocol.

Matches URLs starting with www. that lack a protocol prefix. These should be converted to proper URLs or flagged as bare URLs. Supports port, path, query string, and fragment like URL_STANDARD_STR.

ยงExamples

  • www.example.com
  • www.example.com:8080
  • www.example.com/path
  • www.example.com?query=value
  • www.example.com#section