(text)
| 85 | } |
| 86 | |
| 87 | function extractLuckmailVerificationCode(text) { |
| 88 | const source = String(text || ''); |
| 89 | const matchCn = source.match(/(?:代码为|验证码[^0-9]*?)[\s::]*(\d{6})/i); |
| 90 | if (matchCn) return matchCn[1]; |
| 91 | |
| 92 | const matchChatGPT = source.match(/your\s+chatgpt\s+code\s+is\s+(\d{6})/i); |
| 93 | if (matchChatGPT) return matchChatGPT[1]; |
| 94 | |
| 95 | const matchEn = source.match(/code(?:\s+is|[\s:])+(\d{6})/i); |
| 96 | if (matchEn) return matchEn[1]; |
| 97 | |
| 98 | const matchStandalone = source.match(/\b(\d{6})\b/); |
| 99 | return matchStandalone ? matchStandalone[1] : null; |
| 100 | } |
| 101 | |
| 102 | function normalizeLuckmailTag(item = {}) { |
| 103 | const safeItem = item && typeof item === 'object' ? item : {}; |
no outgoing calls
no test coverage detected