summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-02-10 21:55:56 -0500
committerJune McEnroe <june@causal.agency>2020-02-10 21:55:56 -0500
commit01277ec3b470b16087d5c758e7e674638adeafd9 (patch)
tree7163b1e3cf42e26b1c4f6089b91df0d6deb79396
parentDuplicate effective URL before passing it back to curl (diff)
downloadsrc-01277ec3b470b16087d5c758e7e674638adeafd9.tar.gz
src-01277ec3b470b16087d5c758e7e674638adeafd9.zip
Match URLs inside parens or with paired parens inside
-rw-r--r--bin/title.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/title.c b/bin/title.c
index 0168e2c9..24d4e8eb 100644
--- a/bin/title.c
+++ b/bin/title.c
@@ -190,7 +190,7 @@ int main(int argc, char *argv[]) {
 	char *buf = NULL;
 	size_t cap = 0;
 
-	regex_t urlRegex = regex("https?://[^[:space:]>\"]+", 0);
+	regex_t urlRegex = regex("https?://([^[:space:]>\"()]|[(][^)]*[)])+", 0);
 	while (0 < getline(&buf, &cap, stdin)) {
 		regmatch_t match = {0};
 		for (char *ptr = buf; *ptr; ptr += match.rm_eo) {
roe 2021-05-08Import LibreSSL 3.3.3June McEnroe 2021-04-18build: Remove added x509_verify.3 links 3.3.2June McEnroe 2021-04-18tls: Use EC_KEY_set_ex_dataJune McEnroe 2021-04-18Import LibreSSL 3.3.2June McEnroe 2021-03-05Bump version to 3.3.1p1 3.3.1p1June McEnroe 2021-03-05build: Add OpenSSL includes to libcompatJune McEnroe 2020-12-15Import LibreSSL 3.3.1June McEnroe 2020-11-24Import LibreSSL 3.3.0June McEnroe 2020-10-22Import LibreSSL 3.2.2June McEnroe 2020-09-29Import LibreSSL 3.2.1June McEnroe 2020-09-29import: Add m4/ax_add_fortify_source.m4June McEnroe 2020-08-05build: Add README.7 to EXTRA_DIST 3.2.0June McEnroe 2020-08-03doc: Indicate that only OpenSSL 1.1.1b and newer workJune McEnroe