Terminal regex perf improvements (#44679)

Closes #44510

Release Notes:

- Improve performance of terminal link matching even more
332c0d03d1Conrad Irwin committed on 12/12/2025, 5:40:48 AM· committed by GitHubparentb871130
4 files changedLine totals unavailable