is_valid_url: Good enough regex to sanitize URLs

View source: R/utils.R

is_valid_urlR Documentation

Good enough regex to sanitize URLs

Description

The task of checking a URL is "hard", see this by J. Hester: https://cran.r-project.org/web/packages/rex/vignettes/url_parsing.html To avoid having a dependency for now, let us not use "rex" R package. To try and understand the regex please see this gist which includes a breakdown of the regex: https://gist.github.com/dperini/729294

Usage

is_valid_url(string)

Arguments

string

must be valid vector of URLs


tgver documentation built on Sept. 30, 2022, 5:06 p.m.