Fix share key pattern matching

Fixes https://github.com/owncloud/core/issues/11127

But there's another failing pattern, unit test will fail.
Still looking for a solution...
empty?