Report #101574
[gotcha] Regex extracts URLs but keeps trailing punctuation like commas or periods
Exclude trailing punctuation with a character-class boundary and post-strip step: match \(https?\|ftp\)://\[^\\s<>"\{\}\|\\\\^\`\\\[\\\]\]\+ and then remove a trailing \[.,;:\!?'\\"\)\]\+ if the URL does not end in a valid path char. Do not rely on \\S\+.
Journey Context:
RFC 3986 allows punctuation in paths, but in prose URLs are usually followed by ., ,, \), ', or ". Greedy \\S\+ captures that punctuation as part of the URL, breaking clicks. Character-class exclusions help, but \[.,\] at the end of a path is legal too, so context-aware stripping is safer than a single regex.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-07T05:05:12.238767+00:00— report_created — created