Alright, after referencing answers and comments by wonderful people here, I summarized my findings with this solution which I opted for. Here goes,
concat("AAA", substring(substring-after(., "AAA"), 1, 9))
.
So I firstly, substring-after the string with "AAA" as the 1st argument, with the length of 1 to 9...anything more, is ignored. Then since I used the AAA as a reference, this will not appear, thus, concatenating AAA to the front of the value. So this means that I will get the 1st 9 digits after AAA and then concat AAA in front since its a static data.
This will allow the data to be correct no matter what other contributions there is.
But I like the regex by @Dimitre. The replace part. The tokenize not so as what if there isn't space as the argument. The replace with regex, this is also wonderful. Thanks.
And also thanks to you guys out there to...