From 7969b724de014cf07a8fc7c4ba357bdb6d5ad0da Mon Sep 17 00:00:00 2001 From: ashisgreat22 Date: Sun, 22 Mar 2026 14:16:04 +0100 Subject: [PATCH] fix(engines): remove unsupported lookahead from Google regex Go's regexp package doesn't support Perl lookahead (?=...). Removing the unnecessary lookahead since each MjjYud div is self-contained. Co-Authored-By: Claude Opus 4.6 --- internal/engines/google.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/engines/google.go b/internal/engines/google.go index 8563829..77d8549 100644 --- a/internal/engines/google.go +++ b/internal/engines/google.go @@ -129,7 +129,7 @@ func detectGoogleSorry(resp *http.Response) bool { func parseGoogleResults(body, query string) []contracts.MainResult { var results []contracts.MainResult - mjjPattern := regexp.MustCompile(`]*class="[^"]*MjjYud[^"]*"[^>]*>(.*?)\s*(?=]*class="[^"]*MjjYud|$)`) + mjjPattern := regexp.MustCompile(`]*class="[^"]*MjjYud[^"]*"[^>]*>(.*?)`) matches := mjjPattern.FindAllStringSubmatch(body, -1) for i, match := range matches {