Exercise 3: Reformatting a Date with -replace — Possible Solution ==================================================================== THE EXPRESSION ------------------------------ "2024-08-05" -replace '(\d{4})-(\d{2})-(\d{2})', '$2/$3/$1' WHY IT PRODUCES "08/05/2024" ------------------------------ The pattern (\d{4})-(\d{2})-(\d{2}) captures the input into three numbered groups: group 1 is the four-digit year (2024), group 2 is the two-digit month (08), and group 3 is the two-digit day (05), matching this chapter's own numbered-group example against the same date format. The replacement string '$2/$3/$1' rearranges those captured groups into month/day/year order using backreferences, exactly as this chapter's own -replace example demonstrated - $2 (08) comes first, then $3 (05), then $1 (2024), joined with slashes instead of the original hyphens, producing "08/05/2024". WHY THIS WORKS AS AN ANSWER ------------------------------ It provides a correct, working -replace expression using the same capture-group pattern this chapter's own example established, and correctly explains how each numbered backreference in the replacement string maps to its corresponding captured group to produce the reordered MM/DD/YYYY output.