This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package me.zfly.demo.sensitiveword; | |
import java.io.*; | |
import java.util.ArrayList; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 16进制色+ RGB + RGBA 正则 | |
var colorRegExp = /^(#([0-9|a-f|A-F]{3}){1,2}|[rR][gG][Bb](\((\s*(2[0-4]\d|25[0-5]|[01]?\d{1,2})\s*,){2}\s*(2[0-4]\d|25[0-5]|[01]?\d{1,2})\s*\)|[Aa]\((\s*(2[0-4]\d|25[0-5]|[01]?\d{1,2})\s*,){3}\s*([01]|0\.\d*[1-9]\d*)\s*\)))$/; | |
// 简单的邮箱正则(只验证含有[email protected]) | |
var emailRegExp = /^[\w\.\-]+@([\w\-]+\.)+[\w\-]+$/; | |
// 手机号正则 校验 支持目前绝大部分手机号段 | |
var phoneRegExp = /^(13\d|14[57]|15[^4\D]|17[0135-8]|18\d)\d{8}$/; |