diff --git a/src/patterns.js b/src/patterns.js index c10b8df..3a6cffa 100644 --- a/src/patterns.js +++ b/src/patterns.js @@ -23,7 +23,7 @@ export function stripAnsi(text) { // Detection: find a "limit" line and a "resets" line within 6 lines of each other. const LIMIT_PATTERNS = [ - /(?:hit|exceeded|reached).*(?:your|the)\s*(?:\d+-hour\s+)?limit/i, // "hit/exceeded/reached your limit" + /(?:hit|exceeded|reached).*?limit/i // matches: "hit ... limit" with anything in between /\d+-hour limit/i, // "5-hour limit" /limit reached/i, // "limit reached" /usage limit/i, // "usage limit"