This example the code works so something is different with your clipboard data not with the script
Code:
clipboard=
(
Nathaniel Branden 09 04 1930 - the first step toward change is awareness. The second step is acceptance.
yada yaa 12 12 1984 - lorum ipsum
yeeeeeeeeeea baby 06 08 2001 - keep on rocking in the free world
)
MsgBox % RegExReplace(clipboard,"(\d+) (\d+) (\d+) - (\w+)","$1.$2.$3 - $T4")
You can work directly with the clipboard loose the 'string' variable, perhaps your clipboard doesn't have the correct data, did you think about that ?
Code:
^1::
Send,^x
ClipWait,1
MsgBox % "Before:`n" Clipboard
clipboard:= RegExReplace(clipboard,"(\d+) (\d+) (\d+) - (\w+)","$1.$2.$3 - $T4")
MsgBox % "After:`n" Clipboard
;Send,^v
Return
Why do you need to do it with the clipboard? Almost ANY decent text editor (not notepad) can do this for you without the need to select or copy data to the clipboard.