Join-Object icon indicating copy to clipboard operation
Join-Object copied to clipboard

#43 should exclude ScriptBlocks

Open iRon7 opened this issue 2 years ago • 0 comments

See; https://stackoverflow.com/questions/76534806/parsing-files-and-replacing-matching-entries-based-on-single-element

Feature #43 should exclude ScriptBlocks (or only include strings):

$File1 = @'
2   "Key1"   "ContentAASD#@!"   |
3   "Key2"   "Conte111111#@!"   |
4   "Key112"   "Keep me"   |
'@ -Split '[\r?\n]'

$File2 = @'
2   "Key1"   "I'm correct one"   |
3   "Key2"   "Me too"   |
'@ -Split '[\r?\n]'

$File1 |Merge $File2 -on  { ($_ -split '"')[1] }

Actual:

 ($_ -split '"')[1]
--------------------

Expected:

iRon7 avatar Jun 23 '23 08:06 iRon7