Not hot on sed..
I have the string
<Report name="05/14/14 05:05:53 AM - Report">
in a file.

I need to change the date and time part to the current date and time..
any sed regex to match the date format and timestamp?

If the format is consistent enough, you can just match the surrounding pieces. For example:

sed 's;Report name=".* - Report";Report name="'"`date +"%D %I:%M:%S %p"`"' - Report";'

which results in:

[ezpz@mercury (tmp)]$ cat t.t
<Report name="05/14/14 05:05:53 AM - Report">
[ezpz@mercury (tmp)]$ sed 's;Report name=".* - Report";Report name="'"`date +"%D %I:%M:%S %p"`"' - Report";' t.t
<Report name="05/14/14 10:51:26 PM - Report">

Matching the exact date string becomes a little trickier...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.