Skip to content

Instantly share code, notes, and snippets.

@stfalconaleks
Created October 26, 2017 14:18
Show Gist options
  • Save stfalconaleks/b3df9813f5b2489141c342c11a0dee9a to your computer and use it in GitHub Desktop.
Save stfalconaleks/b3df9813f5b2489141c342c11a0dee9a to your computer and use it in GitHub Desktop.
// Find all rabbits in locations which
// end on: shire, field, wood
// starts on: yellow, green
// and are not case sensitive
// e.g. Blackshire, Greenfield, Sherwood, SHERWOOD, wood, Yellowstone
$locationsRegExp = '/\b(yellow|green)\w*|\w*(shire|field|wood)\b/i';
$rabbits = $search->findRabbitsInLocations(locationsRegExp);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment