Reputation: 83
I'm new with regular expretions. Don't know how to do. Here it's a regex format
reg_no xx(F/S)-(BS/MS)(CS/SE)-x
example of registration number
reg_no 13F-BSSE-4
Solution is
"/^(reg)_(no) [0-9]{2}[(BS)|(MS)]{2}[(CS)|(SE)]{2}\-[0-9]{1}$/"
Upvotes: 0
Views: 448