MCPcopy Index your code
hub / github.com/QLHazyCoder/FlowPilot / extractVerificationCode

Function extractVerificationCode

hotmail-utils.js:36–46  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

34 }
35
36 function extractVerificationCode(text) {
37 const source = String(text || '');
38 const matchCn = source.match(/(?:代码为|验证码[^0-9]*?)[\s::]*(\d{6})/i);
39 if (matchCn) return matchCn[1];
40
41 const matchEn = source.match(/code(?:\s+is|[\s:])+(\d{6})/i);
42 if (matchEn) return matchEn[1];
43
44 const matchStandalone = source.match(/\b(\d{6})\b/);
45 return matchStandalone ? matchStandalone[1] : null;
46 }
47
48 function extractVerificationCodeFromMessage(message = {}) {
49 const sender = firstNonEmptyString([

Callers 3

messageMatchesFiltersFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected