Sorry for the resurrection of an old post.....
I'm no good at RegEx, and I wrote this to get around it using StringReplace. Hope this makes sense. Might not be the best looking piece of code, but it does what the OP asks.
$string = "This is the text I want to keep|This is the text I want to delete"
$findText = "|*"
$replaceText = ""
$newString = StringReplace($string,WildCardFindText($findText,$string),$replaceText)
MsgBox(0,"New",$newString)
Func WildCardFindText($findText, $string)
If StringInStr($findText,"*") > 0 Then
$WildCardPosition = StringInStr($findText,"*")
If $WildCardPosition = StringLen($findText) Then
$findText = StringLeft($findText,(StringLen($findText)-1))
$findText = StringRight($string,(StringLen($string)-StringInStr($string,$findText))+1)
Else
$findText = StringRight($findText,(StringLen($findText)-1))
$findText = StringLeft($string,(StringLen($string) - (StringLen($string)-StringInStr($string,$findText))))
EndIf
EndIf
Return $findText
EndFunc