TRIM SPLIT Powershell cmdlet [英] TRIM SPLIT Powershell cmdlet

查看:72
本文介绍了TRIM SPLIT Powershell cmdlet的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个csv文件,对于每一行,我只需要提取最后几行文字。

I have a csv file where for each of the rows, i need to extract only the last few words of the text.

输入字符串

,不可恢复的错误:006 - 重复交易 - UFM ID:13715030397201 UFMErrorCode:3003 

,Unrecoverable Fault : 006 - Duplicate Transaction - UFM ID : 13715030397201 UFMErrorCode : 3003 

预期输出字符串

UFM ID:13715030397201 UFMErrorCode:3003 

UFM ID : 13715030397201 UFMErrorCode : 3003 

我需要提取所有以UFM ID开头的信息,任何想法,如何做到这一点。我需要为csv文件中的每一行做。

I need to extract all the info which starts with UFM ID, Any ideas, how this can be done. I need to do for each and every row in the csv file.

谢谢,

推荐答案

拆分 - 字符并取最后一个元素。
Split on the - character and take the last element.


这篇关于TRIM SPLIT Powershell cmdlet的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆