简体   繁体   English

3个字符或更多,最少1个减,最多3个数字的正则表达式

[英]Regular expression which 3 characters or more, min one minus, max 3 numbers

I need the following regular expression: 我需要以下正则表达式:

  • Must have 3 alphabetic caracters or more. 必须具有3个或更多字母字符。
  • Must have one lower case or more 必须有一个或多个小写字母
  • Can have 0 to 3 numbers (max 3) 0-9 (123 for example is 3 numbers) 可以有0到3个数字(最多3个) 0-9 (例如123是3个数字)
  • Must have exactly one ú (One ú exactly) 必须只有一个ú (一ú准确)
  • Must finish with one of the following characters : # } . 必须以下列字符之一结尾: # } .
  • Must have min 9 chars, max 12 必须最少9个字符,最多12个字符

I try the following regular expression: 我尝试以下正则表达式:

/^(?=.*[A-Za-z]{3,})(?=.*[a-z]{1,})(?=.*[0-9]\d{0,3})(u{1})[A-Za-z0-9\d]{9,12}$/

One example valid: aA2ca13ú} 一个有效的示例: aA2ca13ú}

You can use this regex that should meet your requirements, 您可以使用符合您要求的正则表达式,

^(?=[^A-Za-z]*(?:[A-Za-z]+[^A-Za-z]*){3,})(?=\D*\d?\D*\d?\D*\d?\D*$)(?=[^ú]*ú[^ú]*$)[úa-zA-Z\d-]{8,11}[#}.]$

Demo 演示版

Let me know if any of your case fails. 让我知道您的任何案件是否失败。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 要检查的正则表达式-不超过2个连续数字或字符,并且不超过1个相同数字或字符 - Regular Expression to check- No more than 2 sequential numbers or characters and No more than 1 same numbers or characters-Javascript 数字和特殊字符的正则表达式 - Regular Expression For Numbers and Special Characters 不允许在JavaScript中使用减号和十进制数和零的正则表达式 - regular expression for not allow minus and decimal numbers and zero in javascript 匹配至少 2 个字符(包括特殊字符)2 个数字且最大长度为 8 的 Javascript 正则表达式 - Javascript regular expression that matches at least 2 character (with special characters included) 2 numbers and max length of 8 Javascript中仅包含数字且在除数字以外的任何位置均不得包含任何字符的字符串的正则表达式 - Regular expression in Javascript for a string which have ONLY numbers & should not have any characters at any position except numbers 正则表达式和换行减 - Regular expression and wrap minus 数字和一位小数的正则表达式 - Regular expression for numbers and one decimal 正则表达式允许超过指定的字符 - Regular Expression allows more than specified characters 用十进制分隔字符串和数字的正则表达式 - Regular expression which splits the strings and numbers with decimal 正则表达式,只允许字符或空格 - Regular expression which allow only characters or space
相关标签
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM