I have some files with lines of text that will include a date int eh format of Mar 1, 2015. I need to replace any dates with the format of 3/1/2015. I can correctly identify the date with a regular expression, just not sure how I can use a -Replace to change the format. Can anyone assist?
Code:
$WordDate = "(?<month>[\dA-Za-z]+) (?<day>\d{1,2}), (?<year>\d{2,4})"
$Line = "4I0139L4 Mar 1, 2015 12:18:58 AM 1 Years"