Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KB title is mangled if it has parentheses in the name #17

Open
sou7611 opened this issue Jun 15, 2017 · 0 comments
Open

KB title is mangled if it has parentheses in the name #17

sou7611 opened this issue Jun 15, 2017 · 0 comments

Comments

@sou7611
Copy link

sou7611 commented Jun 15, 2017

Example :

Portuguese (Brazil) Language Pack - Windows 7 Service Pack 1 for x64-based Systems

Orig code:
$temp.Title = ($update.Title -split('('))[0]
$temp.KB = (($update.title -split('('))[1] -split(')'))[0]

This fixes it (note the change in order; have to extract the KB string to filter it from the title):
$temp.KB = $update.title.Split('(')[-1].Trim().Replace("KB","").Replace(")", "")
$temp.Title = ($update.Title.Replace("(KB"+$temp.KB+")", ""))

For semantics purposes, I also remove the "KB" from the kb# string, as it's already in a column titled that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant