This regex seems overly complex, can you break down what it does?