widsnet.com
20Sep/120

Replace ending on a string with regexp

Replace filetype (everything after the last dot) on a string in powershell.
"fil.fan.log" -replace "\.[^.]*$", ".txt"

Comments (0) Trackbacks (0)

No comments yet.


Leave a comment

No trackbacks yet.