Searching with aptitude

The default way to search with aptitude would be
aptitude search <keyword>
But lets say you want to search for packages that start with alsa. The previous syntax would find all packages which contain the word alsa.
But if we change that to
aptitude search ^alsa
That would find only packages starting with alsa. You can also specify to search for the name of the package (the default), by changing that line to
aptitude search ~n^alsa
When you want to find packaged that end with alsa, you'd change the command as follows:
aptitude search alsa$