regex - How do I match several strings in a text using Regular Expression? -


I need a regular expression to validate a text for many strings that should be present in the present. Say that I have texts

  1. Roses made the boys wild
  2. The wild boys of Mary are really very crazy
  3. Henry

    and I both have 'boys' and 'wild' (any order I want to match both sentences). The correct matches are 1 and 2 but not 3 and 4.

    Anyone?

    <(? = \ Bboys \ b) * (? = \ Bwild \ b) | * (? = \ Bwild \ b) * (? = \ Bboys \ b)

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -