PowerShell – RegEx

I have 2 lines that look like:

Microsoft Outlook Note|46,647

Plain Text,360

I want it to look like:

Microsoft Outlook Note|46,647

Plain Text|360

Right now, I only have a sequence of replaces that get me to where I am right now.

$importCsv = (Get-Content "foobartest.csv") -replace ',"','|' -replace ',','' -replace '"','' 

Currently my output is:

Microsoft Outlook Note|46,647

Plain Text360

submitted by /u/DolphinRapeIsBad
[link] [comments]

Leave a Reply