For Gmail filtering you first need to construct the "Search Operators." Although it's not a regular expression, you can still achieve what you want.
Some words - r1234 - Some more words
Would be something like "Some words AROUND 1 Some more words"
Find messages with words near each other. Use the number to say how
many words apart the words can be
Example: holiday AROUND 10 vacation
Add quotes to find messages in which the word you put first stays
Example: "secret AROUND 25 birthday"
Here is the official help
I ended up here because I was trying to reduce the number of separate filters I had and wanted to group them together. After reading the reference my messages are all clean.
from:("Twitter" OR "Facebook")