Remove guids from string


hi,

i have powershell script iterates through sharepoint web app, , returns pages titles, descriptions, url’s , keywords tagged against page, works fine, apart can’t stop returning keyword guids.

currently output string is:

keyword1 | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx; keyword2 | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx; keyword3 | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx;

but need:

keyword1 | keyword2 | keyword3

i’ve tried getting script ignore guids no success, trying write script go through , remove guids, cant find way without specifying guids beforehand, there couple of thousand i’d rather not have that.

is there anyway use wildcards like: $myarray.remove (“*-*-*-*-*”)

thanks in advance


$guid_regex = "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}" $myarray -replace $guid_regex

 


[string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "


Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

WIMMount (HSM) causing cluster storage to go redirected (2012r2 DC)

Failed to delete the test record dcdiag-test-record in zone test.com

Azure MFA with Azure AD and RDS