bugfix: only compile regex in extract_urls() once