- May
- 581
- 4
I have a tool which allows me to extract the sum of a single field onto the clipboard, but there are extra characters. When I activate the hot key that saves the sum, the clipboard then contains (e.g.) "Sum=-12,345.67". There's no + sign if the sum is nonnegative. But what I want to paste elsewhere is "-12345.67".
So I made this alias
The inner @rereplace removes any minus sign which is not followed by a digit, along with the nondigit; the outer @rereplace removes everything but digits, minus signs, and decimal points. It's not perfect but it does what I need.
I also put a shortcut on my desktop for target
So I made this alias
Code:
alias num*clip=`echos %@rereplace[[^^0-9.-],,%@rereplace[-[^^0-9],,%@clip[0]]] > clip:`
I also put a shortcut on my desktop for target
Code:
"C:\Program Files\JPSoft\TCMD\tcc.exe" /i /c (echos %@rereplace[[^^0-9.-],,%@rereplace[-[^^0-9],,%@clip[0]]] > clip:)
Last edited: