I have some data from which I only want to extract Card details i.e. Card number, Expr month/Year and Cvv. I tried many patterns but none of them worked for both of them. If one gets matched then the other wont.
Test Data:
4400634848591837Cvv: 362Expm: 04Expy: 20
4400634848591837:04 20 362
4400634848591837|04/24 362
4400634848591837 0420 362
Regex:
(\d{16})[\/\s:|]*?(\d\d)[\/\s|]*?(\d{2,4})[\/\s|-]*?(\d{3})
This matches the rest of them but I haven't figured out how to match first line. I have tried +- Lookahead & Lookbehind but It never worked for me. So any help would be great.
Demo: Here