Help with string.match

Hello.
Say there are strings like these.
:key args, .key args

I wanted to know if it is possible to use string.match ONCE and nothing else to produce an effect such that it only matches the key if the first character is in the set [%p:/] and return me the characters after it but before the space i.e. .test args returns test but test arg, a/test arg return nil.

I tried patterns like: ^[%p/:]%w+ and the likes using anchors but to no avail.

You could try a pattern like: ^[%p:/]([^%s]+), but you could also probably simplify [%p:/] to just %p because ":" and "/" are included in the %p class.

Thanks alot have been trying to figure it out for some time now!