function initTool() {
document.getElementById('tool-app').innerHTML = '';
}
function doIt() {
var text = document.getElementById('inp').value;
var emails = text.match(/[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}/g) || [];
var urls = text.match(/https?:\\/\\/[^\\s<>"'(){}|\\^\\[\\]]+/g) || [];
var phones = text.match(/1[3-9]\\d{9}/g) || [];
var html = '';
if (emails.length) html += '
📧 邮箱 ('+emails.length+'):
'+emails.join(' ')+'
';
if (urls.length) html += '
🔗 网址 ('+urls.length+'):
'+urls.join(' ')+'
';
if (phones.length) html += '
📞 手机号 ('+phones.length+'):
'+phones.join(' ')+'
';
if (!html) html = '
未提取到邮箱、网址或手机号
';
document.getElementById('out').innerHTML = html;
}
window.addEventListener('DOMContentLoaded', initTool);
n