Community Patterns

Community Library Entry

0

Regular Expression
Created·2021-05-21 07:54
Flavor·Java

"
\s(?=\w*[0-9])(?=\w*[A-Z])([A-Z\d]{11}|[A-Z\d]{7})\s
"
g
Open regex in editor

Description

Regex to capture AlphaNumeric String

  • Length should be 7 or 11
  • Must contain at least one Alphabet
  • Must contain at least one Numeric
Submitted by Suman Maharjan