Remove another unwrap on regex compilation (#29984)

Follow up to #29979

Release Notes:

- Fixed a (hypothetical) panic in terminal search
4fdd14c3d8Conrad Irwin committed on 5/6/2025, 10:18:03 AM· committed by GitHubparent848c4f7
3 files changedLine totals unavailable