You have received an encrypted message from space. Your task is to decrypt the message with the following simple rules:
[10AB], it means you need to repeat the letters AB for 10 times.Create a function that takes encrypted message str and returns the decrypted message.
spaceMessage("ABCD") ➞ "ABCD"
spaceMessage("AB[3CD]") ➞ "ABCDCDCD"
// "AB" = "AB"
// "[3CD]" = "CDCDCD"
spaceMessage("IF[2E]LG[5O]D") ➞ "IFEELGOOOOOD"
N/A