[英]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.