Skip to content

Instantly share code, notes, and snippets.

@tedslittlerobot
Last active December 30, 2015 08:59
Show Gist options
  • Save tedslittlerobot/7805821 to your computer and use it in GitHub Desktop.
Save tedslittlerobot/7805821 to your computer and use it in GitHub Desktop.
A basic php filter for responding to questions from project managers. will improve later.
// "/((can\'t we)|(we can)|(can we) just)?.*(make [a-z] up)?(bash|bosh|bish)?(behind the scenes)?(fudge|bodge)?(quick wins?)?.*((for now)|(can\'t we)|(this (time)|(once)))?/
$prefix = '(can\'t we)|(we can)|(can we) just';
$content = '(make [a-z] up)?(bash|bosh|bish)?(behind the scenes)?(fudge|bodge)?(quick wins?)?';
$suffix = '(for now)|(can\'t we)|(this (time)|(once))';
$filter = "/({$prefix})?.*{$content}.*({$suffix})?/";
if ( preg_match( $filter, $question ) )
{
return 'no';
}
else
{
return $this->consider( $question );
}
@sammountford
Copy link

May I please suggest that we add Bodge as I just heard a PM say it and it gave me shivers of anger

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment