As with all the programmer questions, I will update the post with the answer after people comment on this. Today's question is:

Comments

Cristian Lupașcu

<p>For matching any pattern, just concatenate them with pipe symbols: (regex1)|(regex2)|(regex3)<br>Matching all of them can be achieved using positive look-aheads: (?=.*regex1)(?=.*regex2)regex3</p><p>Note that the `.*` might become expensive. If the patterns attempt to match the entire string (are of the form `^...$`), then the `.*`s can be left out.</p>

Cristian Lupașcu

Post a comment