[英]Regular Expression to exclude CRLF from a line in string
我有这个正则表达式,它将提取数据并将其分为三个不同的组:begin,CustomerNo和end。
^(?<begin>(.*?[|]){14})(?<CustomerNo>.*?)(?<end>[|].*)*$
这是可行的,只是“ end”组的末尾包含CrLf字符。 有没有办法在上述正则表达式的每一行的末尾不包含CrLf字符?
尝试这个:
@"^(?<begin>(.*?[|]){14})(?<CustomerNo>.*?)(?<end>[|][^\r\n]*)"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.