Sorry if this is a duplicate, I can't seem to find my first iteration of this question.
I am trying to scrape a website to produce the date of an updated app. My code produces two dates, so I'd like to know how to trim that down to one string, which in this case should be October 31, 2018. I know how to manipulate it after that for my use but am stuck in how to trim the output.
$months = "january", "february", "march", "april", "may", "june", "july", "august", "september", "october", "november", "december"
$response = Invoke-WebRequest -Uri "https://play.google.com/store/apps/details?id=com.airwatch.androidagent&hl=en_US"
$data = ($response.ParsedHtml.getElementsByTagName('span') | Where {$_.className -eq 'htlgb'} ).innerText
$data | Select-String -Pattern $months