Removing characters form text file and replaicng

I currently have a text file which looks like this

2010.26 (0.0306746) @ 59,19

I want to remove all 22 characters up till the "59"

NOTE: REMOVE, not replace with (null)
NOTE2: The 59 CANNOT be taken as a number to consider in the script... it is not fixed. The only thing that is fixed is the 20 characters at the start till we reach the 59.

furthermore I want to replace the "," with a "+" sign.

Thanks in advance.

With the given input example, this works:

sed 's/.* //;s/,/+/' file

but I have no idea if this is representative of what you really want to do.

Are you trying to delete everything before a literal "59" or are you trying to delete everything up to and including the last space on a line?

Is there only one line in your input file?

Are you trying to change the contents of the file, or are you trying to extract and modify data in the file without changing the file itself?

start beginning from the end of the file and delete every thing after the fifth character (59)
> maybe this can be achieved by reading the 5 last characters of the line and write it to the same text file ?

Ok, the replacing part will work like this:

set /p text= <textfile.txt    
set str=%text% 
echo.%str%  
set str=%str:text-to-replace=replacing-text%
ECHO %str% > textfile.txt

---------- Post updated at 11:40 AM ---------- Previous update was at 10:11 AM ----------

Is there a way to read the last - lets say 7 characters- from a line into a variable ?