I want to remove all characters in a string, from an Asterisk to the end of the string, but the End Of Line regular expression character ('$') does not work for me. $pat = "[*]$"
consolewrite("+++: " & StringRegExpReplace("D:\Temp\File.txt * 2abc def" ,$pat, "") & @CRLF
$pat = "[*]"
consolewrite("+++: " & StringRegExpReplace("D:\Temp\File.txt * 2abc def" ,$pat, "") & @CRLF
results in:
+++: D:\Temp\File.txt * 2abc def
+++: D:\Temp\File.txt 2abc def I expected the first result to be: "+++: D:\Temp\File.txt " (The second result just removed the Asterisk, as I expected.) I tried \z and \Z, but they didn't work either.