I am trying to do the following nginx redirect
seems like it should be simple but I cannot figure out how to isolate the username which can variable.
Unless you actually need the username for something, or you need to redirect only for that exact location and no subdirectories, then it's exceedingly simple - you really don't need to look for the username at all.
But for the sake of argument, if you needed to grab the user name and, say, insert something between the username and the rest of the path, you could do something like this:
The first pair of parentheses will capture everything after