Skip to content

Instantly share code, notes, and snippets.

@vaderj
Last active June 12, 2018 17:01
Show Gist options
  • Save vaderj/2e7548331c04a417d4995087169fa911 to your computer and use it in GitHub Desktop.
Save vaderj/2e7548331c04a417d4995087169fa911 to your computer and use it in GitHub Desktop.
RegEx used for SharePoint search query rulesquery terms must contain all three words: hospital, marketing, guide(?i: = case insensitive #RegEx #SharePoint
^(?i:(?=.*\bhospital\b)(?=.*\bmarketing\b)(?=.*\bguide\b)).+
This will return for:
(doctor OR dr OR dvm) + (compensation OR pay) + (calculator OR calc)
(?=.*\bdoctor\b|.*\bdr\b|.*\bdvm\b)(?=.*\bcompensation\b|.*\bpay\b)(?=.*\bcalculator\b|.*\bcalc\b).+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment