yume wrote:
What do you mean solved?
I know that a:=5+2 is 7 but that is not what i asked!!!
example
Code:
data=aa 5 ggg 6
a:=RegExreplace( data,".* (\d+).*g (\d+)","$1+$2" )
MsgBox, %a%
Maybe i should have given an example in my first post

Maybe you should
carefully read the help page for the RegexReplace "replacement" argument".
Quote:
Replacement
The string to be substituted for each match, which is plain text...
This is probably the best you will get:
Code:
data=aa 5 ggg 6
RegExMatch( data,".* (\d+).*g (\d+)",out )
a := out1 + out2
msgbox, %a%
MsgBox, %a%
What you suggested maybe possible with "regex callouts", which ahk does not provide, but even if it did, you would still need an external function to to the maths.