I would like to write a regex for searching for the existence of some words, but their order of appearance doesn't matter.
For example, search for "Tim" and "stupid". My regex is Tim.*stupid|stupid.*Tim
. But is it possible to write a simpler regex (e.g. so that the two words appear just once in the regex itself)?