【发布时间】:2016-10-24 14:36:44
【问题描述】:
我正在使用 C# 编写 pdf scraper,但遇到了正则表达式问题。我只想匹配帐号,而我的正则表达式同时匹配不正确的行和正确的行。我想我必须匹配所有内容,直到换行,但我找不到办法。
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
提前致谢!
【问题讨论】: