Retain part of a regex for a -replace

Hopefully this sounds worse than it is.

$PSItem -replace "\d{1,4}-\d{1,2}-\d{1,2}\s\d{1,2}:\d{1,2}:\d{1,2},\d{1,3}\sSomeUniqueText

I want to use the above string but only change “td” to td style=‘background-color:#FF8080’ leaving the original data defined by \d{1,4}-\d{1,2}-\d{1,2}\s\d{1,2}:\d{1,2}:\d{1,2},\d{1,3}\sSomeUniqueText as it is.

Long story short I need the whole string to define where to change but only want to change a piece of it leaving the rest alone.

ok its not populating right, its removing the html tag characters

$PSItem -replace "td\d{1,4}-\d{1,2}-\d{1,2}\s\d{1,2}:\d{1,2}:\d{1,2},\d{1,3}\sSomeUniqueText"

just picture the td as having html tags on it i guess

Not able to understand your question. What problem are you facing ?

Note: When you have update t your own post before anyone replies, please do the update using the edit option in the same post.

the forum is removing the characters you get when you hold shift and press , or … its not letting me put the whole string in here. is there an escape character for this forum

Well found a way to do what I was trying to express. here is what I did

if ($PSItem -match "td\d{1,4}-\d{1,2}-\d{1,2}\s\d{1,2}:\d{1,2}:\d{1,2},\d{1,3}\sSomeUniqueText) { 
$PSItem -replace "td", "td style='background-color:#FF8080'" }Else {$_}

the td is an html tag but it wont let me put the symbols on it in the forum

@PJ - HTML or XML you need to use Gist