Tuesday, 27 August 2013

Remove beginning and end of string for every value in array

Remove beginning and end of string for every value in array

I have an array of data that looks like this:
Resource file d:\path\relevantDtata\WebConfigResource.resx is missing
value for key /configuration/addSettings/add[@key="relevantData"]
Resource file d:\path\relevantDtata\WebConfigResource.resx is missing
value for key /configuration/addSettings/add[@key="relevantData"]
Resource file d:\path\relevantDtata\WebConfigResource.resx is missing
value for key /configuration/addSettings/add[@key="relevantData"]
Resource file d:\path\relevantDtata\WebConfigResource.resx is missing
value for key /configuration/addSettings/add[@key="relevantData"]
Resource file d:\path\relevantDtata\WebConfigResource.resx is missing
value for key /configuration/addSettings/add[@key="relevantData"]
Almost all of this data can be deleted except for a few short parts.
Resource file d:\path\ can go away
\WebConfigResource.resx is missing value for key
/configuration/addSettings/add[@key=" can as well. and the file "] can
too.
Currently all this data is stored in $validationVar I'm guessing I am
wanting to playing around with substring but I'm not entirely sure what
exactly needs to happen. Possibly something like the below?
$validationVar | % $_.substring(15)

No comments:

Post a Comment