Required Regex Validation Start two Fixed character and then after First point required alphanumeric characters and second point required Numeric fixed Character.
Example:
- if character start with PB then allow 25 character
- Length : additional 25 numbers. - Example : PB12345Ab8901234567890123mM If “PB” then 25 alphanumeric characters. PB+25numbers
- if character start with CC then allow 14 character
- Length : additional 14 numbers. - Example : CC012345678901234 If “CC” then 14 numbers. CC+14numbers
(?:PB[\da-zA-Z]{25}|CC\d{14})$ i need in this expression add one more condition if string not start with PB or CC then it's allow 0 to 100 character.
Rajanikant HawaldarRank #110 · 20.3K reputationPosted Sep 10, 2020, 8:46 AM EDT
Jignesh KumarRank #91 · 22.9K reputationPosted Sep 10, 2020, 7:14 PM EDT
jacky lad11 reputationPosted Sep 10, 2020, 9:08 PM EDT
- Length : additional 25 numbers. - Example : PB12345Ab8901234567890123mM If “PB” then 25 alphanumeric characters. PB+25numbers
Aman GuptaRank #193 · 12.4K reputationPosted Sep 10, 2020, 9:07 AM EDT
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts