正則表達式工具

使用實時匹配測試和構建正則表達式

正則表達式工具
輸入正則表達式和測試文本,實時查看匹配結果

未找到匹配項

電子郵件
^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$
Matches valid email addresses
URL
^(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([/\w .-]*)*\/?$
Matches URLs with or without http(s) prefix
IPv4 地址
^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$
Matches IPv4 addresses
日期 (YYYY-MM-DD)
^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$
Matches dates in YYYY-MM-DD format
時間 (HH:MM:SS)
^([01]?[0-9]|2[0-3]):[0-5][0-9](:[0-5][0-9])?$
Matches times in HH:MM:SS or HH:MM format
電話號碼
^\+?[1-9]\d{1,14}$
Matches international phone numbers (E.164 format)
強密碼
^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$
Matches strong passwords (min 8 chars, at least one uppercase, lowercase, number, and special character)