I want to split two sentences with 'apple' and 'apples' simultaneously. I try to use a regular expression 'apple*' or 'apple?'. But it doesn't work. I see the 's' in the second part of the second sentence. What's wrong with regex or split ?
$spl = '(apple*)'
'This apple for you','These apples for you' | % {$_ -split $spl}