Created
June 14, 2013 23:21
-
-
Save jwcobb/5786037 to your computer and use it in GitHub Desktop.
Attempting to convert [MonkeyFighter](https://github.com/TeamOneTickets/Monkey-Fighter) to dynamically handle all grawlix replacements in order to un-censor words.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Symbols that could be used to replace letters | |
* | |
* @var string | |
*/ | |
protected $_grawlix = '[!@#$%&*-]'; | |
/** | |
* Associative array of replacements to make | |
* | |
* @var array | |
* @lol http://www.youtube.com/watch?v=vbZhpf3sQxQ | |
*/ | |
protected $_replacements = array( | |
'/S' . $this->_grawlix . '{2}T/' => 'SHIT', | |
'/([Ss])' . $this->_grawlix . '{2}t/' => "$1" . 'hit', | |
'/P' . $this->_grawlix . '{2}s/' => 'PISS', | |
'/([Ss])' . $this->_grawlix . '{2}s/' => "$1" . 'iss', | |
'/F' . $this->_grawlix . '{2}K/' => 'FUCK', | |
'/([Ff])' . $this->_grawlix . '{2}k/' => "$1" . 'uck', | |
'/F' . $this->_grawlix . '{3}ING/' => 'FUCK', | |
'/([Ff])' . $this->_grawlix . '{3}ing/' => "$1" . 'ucking', | |
'/C' . $this->_grawlix . '{2}T/' => 'CUNT', | |
'/([Cc])' . $this->_grawlix . '{2}T/' => "$1" . 'unt', | |
'/C' . $this->_grawlix . '{2}K/' => 'COCK', | |
'/([Cc])' . $this->_grawlix . '{2}k/' => "$1" . 'ock', | |
'/P' . $this->_grawlix . '{4}Y/' => 'PUSSY', | |
'/([Pp])' . $this->_grawlix . '{4}y/' => "$1" . 'ussy', | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Also, I like your implementation of a grawlix character better than mine. I was thinking about the best way to do that on the plane, but I would have used yours had I had access on the plane, but was just trying to get it working.