Given a vector of URLs I want to filter these URLs and pulling out only URLs matching a set of patterns.
/pages/
/econo/*
/categ/sub
I am currently using the data.table
package. For matching a vector with a single pattern I use:
urls[! urls %like% "/pages"]
However, when using multiple patterns this does not work:
urls[! urls %like% c("/pages/", "/categ/sub")]