VTG123 vijay AAA999 Aaaaa
John WER456 Aaaa AAA999.
In this above if the string_final is having the pattern AAA999 then that part should be moved to another variable.
As there are many observations and i dont know where this pattern will come in the string_final.
Name string_final output
ABC999 Aaaaaaaaaa ABC999
VTG123 vijay AAA999 Aaaaa VTG123
John WER456 Aaaa AAA999. WER456