Using $regex with $group

Hi,
Out of curiosity, can $regex be used in the $group stage?

Thanks.