\b\w+@\w+\.\w+\b
^1[3-9]\d{9}$
https?:\/\/[\w\-]+(\.[\w\-]+)+([\w\-.,@?^=%&:/~+#]*[\w\-@?^=%&/~+#])?
^\d{4}-\d{2}-\d{2}$
^\d{6}$
^[A-Za-z0-9_]{3,16}$
^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{8,}$
^\d+\.\d{2}$
// JavaScript 代码示例 const pattern = /\b\w+@\w+\.\w+\b/g; const text = "联系邮箱:test@example.com, admin@company.org"; const matches = text.match(pattern); console.log(matches);
# Python 代码示例 import re pattern = r'\b\w+@\w+\.\w+\b' text = "联系邮箱:test@example.com, admin@company.org" matches = re.findall(pattern, text) print(matches)
// Java 代码示例
import java.util.regex.Matcher;
import java.util.regex.Pattern;
String pattern = "\\b\\w+@\\w+\\.\\w+\\b";
String text = "联系邮箱:test@example.com, admin@company.org";
Pattern p = Pattern.compile(pattern);
Matcher m = p.matcher(text);
while (m.find()) {
System.out.println(m.group());
}
// PHP 代码示例 $pattern = "/\\b\\w+@\\w+\\.\\w+\\b/"; $text = "联系邮箱:test@example.com, admin@company.org"; preg_match_all($pattern, $text, $matches); print_r($matches[0]);