Hi, I know there are plenty of questions on SO asking for regex help so I apologise in advance for yet another.
I've never used regular expressions before and I've searched online (and downloaded a program to show you the results of your regex) but I can't seem to figure the darn thing out myself which is annoying because I know it's really easy.
I have lots of lines of text taken from a csv file. Most lines are of the format:
Serial Number, Description, Status
I need to know which lines contain serial numbers. The serial numbers are generally of the format ABC001. But sometimes there's 4 letters, sometimes 4 numbers etc. So I tried to make an expression that just checked the first digit is a letter and the last digit before the first comma is a number. I know it's not perfect but it's completely fine for my purposes.
I tried ^[A-Z]$[0-9] as I thought 'starts with A-Z, ends with 0-9' but this isn't working. Could someone please help me as it's driving me mad!
I don't know this makes a difference but I'm using C#.