Useful for mobile and card number validation with specific format
(((\+91)+(\d{5}|\s){4})|((\d{5}|\s){3}))
- will validate phone number with +91 12345 67890
or 12345 67890
(\d{5}|\s)
- will validate a group of 5 digits:
`ex-success`: 12345
`ex-fail` : 12345 67890, ...
(\d{5}|\s){3}
- will validate a group of 5 digits with group range of 3 {3}
including space:
`ex-success`: 12345 67890
`ex-fail` : 12345, 12345 67890 12345, ...
(\+91)+(\d{5}|\s){4}
- will validate a group of 5 digits and an area code +91
with group range of 4 {4}
including spaces:
`ex-success`: +91 12345 67890
`ex-fail` : +11 12345 67890, +11 12345, +91 12345 67890 12345, ...
^((\w{4}\s){3})((\d{4}){1})$
- will validate card number with exact format xxxx xxxx xxxx 1234
`ex-success`: xxxx xxxx xxxx 1234
`ex-success`: aadd 122a xxxx 1234
`ex-fail` : 1234 aaaa xxxx ab12
`ex-success`: 1234 aaaa xxxx 1234
^((\w{4}\s){3})
- will validate a group of 4 word characters including digits:
`ex-success`: xxxx 1234 xxxx
`ex-fail` : 12345 ..., aaaa1 xxxx2 ab12 ..., xxxx xxxx xxxx 12345
((\d{4}){1})$
- will look for exact 4 digits at the end
`ex-success`: ... 1234
`ex-fail` : ... a123