Another grep regex example

View all lines from /etc/ssh/sshd_config which have options yes and are not commented:

grep '^[^#].*yes$' /etc/ssh/sshd_config