\w match "word" symbols (letters, digits and underscore) but in your example there is / after com which is not :alnum: so your pattern match nothing == empty output.
You can add / to pattern and look what is happend:
grep -oP 'com/\K\w+'
FYR -P option is experimental and can do which not expected in more systems, so you can do your task in other way:
sed "/com/s/.*\/\(\w\+\).\?$/\1/"