I am trying to merge below four pattern into single pattern using pipe(|
), but not getting the required result.
Scenario:
- max 7 entry(alphabet and digits)
- should contain 4 and only 4 consecutive digits(mandatory)
Patterns:
([\d]{4}[a-zA-Z]{0,3})
[a-zA-Z]{0,1}[\d]{4}[a-zA-Z]{0,2}
[a-zA-Z]{0,2}[\d]{4}[a-zA-Z]{0,1}
[a-zA-Z]{0,3}[\d]{4})