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

is_valid_url(string)

Arguments

string

must be valid vector of URLs