I'm working on a pdf scraper in C# and I got stuck on a regex problem. I want to match just the account number and my regex statement is matching both the incorrect line and the correct line. I think I have to match everything until a new line but I can't find a way to do it.
This is my regex: ([A-Z0-9\-]{5,30})-[0-9]{1,10}-[0-9]{3}
XXX-XX-914026-1558513 // I don't want to match this line
130600298-110-528 // I want to match this line
Thanks in advance!