You could use env | grep '^prefix'.
For example:
$ env | grep '^LESS'
LESSBINFMT=*u.
LESS=-MMqx4ij3
LESSOPEN=| /usr/bin/lesspipe %s
LESSCLOSE=/usr/bin/lesspipe %s %s
If you only want the values and not the variable names, use awk:
$ env | awk -F= '/^LESS/ {print $2}'
*u.
-MMqx4ij3
| /usr/bin/lesspipe %s
/usr/bin/lesspipe %s %s
(or print $1 for just the variable names)
Update 2019-05-17
I was brought back to this answer by an upvote, and realised there's an obvious improvement:
typeset -p works better than env, it outputs all variables whether they're exported or not. For example:
typeset -p | awk '$3 ~ /^apple_/ { print $3 }'
To use a variable rather than a fixed string:
prefix=apple_
typeset -p | awk '$3 ~ "^"pfx { print $3 }' pfx="$prefix"
or just export $prefix so it's available in awk's ENVIRON array:
export prefix=apple_
typeset -p | awk '$3 ~ "^"ENVIRON["prefix"] { print $3 }'
Note: with a little work, this can be made to work with other shells such as ksh or zsh, but it is important to note that the output format for typeset -p is different in other shells, so the awk script will have to be modified to suit them.