This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To extract transactions from an Apple card PDF statement to a tab delimited text under Powershell, you can use these commands: | |
pdftotext -table '.\Apple Card Statement - October 2019.pdf' | |
$regex = '^(\d\d)/(\d\d)/(20\d\d)\s+(.*?)\s+\S*%\s+\$\S+\s*(.*)' | |
get-content '.\Apple Card Statement - October 2019.txt' | where-object { | |
($_ -replace "\s+"," ") -match $regex | |
} | foreach-object { |