I promise this will be the last "clarification" I make in this
You are close. You are very close. I would make these notes
The 'g' option causes a global match - ie, find them
The regex, in this case, returns the list of all matches.
In other cases, it will return how many matches were found.
The difference is the context in which it is used. Since
reverse() expects a list, it forces the regex to be evaluated
in list context and, hence, returns the list.