0

I need logical AND in regex for exactly two equal names.

something like

house AND house in any order

match with following strings

  • 'one house two house'
  • 'house car boat house apple'
  • 'house house car'

no match with following strings (e.g.)

  • 'one house two house three house' (there are 3 house words , there should be 2 house words)
  • 'an house car' (there is only 1 house , there should be 2 house words)
  • 'car boat tree home' (there is no house word , there should be 2 house words)
gr68
  • 420
  • 1
  • 10
  • 25

0 Answers0