I've got a list of email addresses belonging to several domains. I'd like a regex that will match addresses belonging to three specific domains (for this example: foo, bar, & baz)
So these would match:
- a@foo
- a@bar
- b@baz
This would not:
- a@fnord
Ideally, these would not match either (though it's not critical for this particular problem):
- a@foobar
- b@foofoo
Abstracting the problem a bit: I want to match a string that contains at least one of a given list of substrings.