skip to Main Content

Javascript – How to make sipmlify this regex?

I have this regex: "(WORD1.*WORD2.*WORD3)|(WORD1.*WORD3.*WORD2)|(WORD2.*WORD1.*WORD3)|(WORD2.*WORD3.*WORD1)|(WORD3.*WORD1.*WORD2)|(WORD3.*WORD2.*WORD1)" It matches to these words: WORD1WORD2WORD3 WORD1AWORD2BWORD3C WORD3WORD1WORD2 WORD1WORD2WORD3WORD1 But not these words: WORD1WORD1WORD2 WORD1AWORD1BWORD2C This regex matches when it finds a string where there are the 3 words (WORD1, WORD2, WORD3) in any order.…

VIEW QUESTION
Back To Top
Search