What happens is that the regular expression will start searching the first position of the string and attempt to match
it will try the other alternative at this position. The * after the o gives it the option of matching nothing. (which it does). And, since it has found a match it replaces it with an
. Regular expressions try all the possible alternatives at a position in a string before moving on to the next position (left most first). so it never reaches the
part as it can match nothing much earlier.