我正在尝试匹配字符所有字符,直到模式A0343443(A[0-9]+
)
输入:
A546454 : This and that happened at C:\User\John\Documents\folder. There was an error reading
the file
B546454 : This and that happened at C:\User\John\Documents\folder. There was an error reading the file
A595949: This other thing happened at C:\User\John\Documents\....
期望的输出:
A546454 : This and that happened at C:\User\John\Documents\folder. There was an error reading the file
A595949: This other thing happened at C:\User\John\Documents\....
由于行结尾不确定,我希望在到达A[0-9]+
或B[0-9]+
时结束
我尝试了积极的前瞻:
^(?=A[0-9]+)
但是在首个A
即。 Alot of chocolate
导致它停止。
有什么想法吗?
谢谢