【问题标题】:transpose column into rows through delimiter通过分隔符将列转置为行
【发布时间】:2017-06-23 12:04:24
【问题描述】:

我有以下格式的数据。这些值在一列中。我需要转置它们以保持分隔符。我尝试使用正则表达式 '\r\n' 替换这些值,但它什么也没做。

653
|110
|1 January 2016
|Default
|Automatically identified, customer dialed
|None
|NPA dialed by customer
|000-380-5414
|03:59:57.5
|4:01.9
|CIC = 0000 |1 January 2016
|03:59:35.5
|4:23.9
|10
|SS7 from IC to AT, SS7 to EO |Tandem
|104
|Routing Indicator = Direct - Incoming Different network |104
|Routing Indicator = Direct - Outgoing Different network |119
|Trunk Group Number - Interoffice = 9056 |Network Interface Description = Feature Group D
|Administrative Domain = 0 |Final module
|
625
|119
|1 January 2016
|Default
|Automatically identified, customer dialed
|None
|000-000-0000
|NPA dialed by customer
|000-380-5084
|04:04:26.6
|0:00.0
|CIC = 0000 |1 January 2016
|04:04:24.6
|0:01.9
|01
|SS7 from IC to AT, SS7 to EO |Tandem
|CAC not dialed, station not presub, no presub ind
|Neither ANI nor CPN provided
|104
|Routing Indicator = Direct - Incoming Different network |104
|Routing Indicator = Direct - Outgoing Different network |119
|Trunk Group Number - Interoffice = 9056 |Network Interface Description = Feature Group D
|Administrative Domain = 0 |Final module
|

如何将其转换为以下结构

653|110|1 January 2016|Default|...
652|119|1 January 2016|Default|...

我有文本板和记事本++。非常感谢任何帮助...

【问题讨论】:

    标签: text notepad++ transpose textpad


    【解决方案1】:

    查找内容:\r\n\| 替换为:\|

    【讨论】:

      【解决方案2】:

      你可以这样做:

      • Ctrl+H
      • 查找内容:\R\|
      • 替换为:|
      • 全部替换

      说明:

      \R  : any kind of line break
      \|  : pipe character
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2018-03-17
        • 1970-01-01
        • 2016-09-10
        • 1970-01-01
        • 2023-01-13
        • 2019-09-23
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多