The regex I showed before, because of the $ at the end, will only match if the string occurs just before a newline. So if you want to match things "in the middle of a line", just take the dollar sign out. Also, in your original question the regex started with a period, not an @ sign, and it looks like that's what you're after, so you should make that correction as well. /\@(?:company?|aa\.company|bb\.company)\.com/should do the trick. I'm still not sure why you have "company?". Is that just a typo? It will match compan or company, and it doesn't sound like you want the former. That's why I said you need to state your question more clearly.
However, if everything I've mentioned so far is correct (you want to find strings in the middle of a line, starting with an @ sign, possibly followed by aa. or bb., then followed by company.com), then here's a simpler way to just state that: /\@(?:aa\.|bb\.)*company\.com/
In reply to Re (3): Getting all emails
by VSarkiss
in thread Getting all emails
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |