Commit ad958375 authored by nanahira's avatar nanahira

fix ocr rule

parent 9cb4cad5
Pipeline #14536 canceled with stages
in 1 minute and 10 seconds
......@@ -27,11 +27,11 @@ export class OcrService extends ConsoleLogger {
if (!text) {
return [];
}
const exactMatches = text.match(/QQ: \d{5,10}/g);
const exactMatches = text.match(/QQ:\s?\d{8,10}/g);
if (exactMatches) {
return exactMatches.map((info) => info.slice(4));
return exactMatches.map((info) => info.replace(/^QQ:\s?/, ''));
}
return text.match(/\d{8,10}/g) || [];
return text.match(/\d{9,10}/g) || [];
} catch (e) {
this.error(`Failed to check url ${url}: ${e.message}`);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment