|
word1[A-Za-z0-9[:space:][:punct:]]*word2
would look for the first occurance of word 1 and the last occurance of word2.. not really what you need I guess
word1[A-Za-z0-9[:space:][:punct:]]{1,30}word2
would look for word1 and word2 and up to 30 chars between them
however, if the 30 chars between contain another occurance of word1, word2 they won't get detected
|