MISC: How to grep several strings at once

It is needed to use the Extended Regular Expressions (ERE), which can be done by add the -g argument to the grep command. Here's an example:

grep -E 'foo|bar' /var/log/messages