Reading your validation code below, I sort of wonder if you should add capture groups to these so you can get the app name vs. username before the `:`.  This will mean you can match and then check that capture group against your data vs. having to worry about where the `:` is in the string.