February 2012
16 posts
JSTN: tylr: Can’t believe I’ve never thought of... →
tylr:
Can’t believe I’ve never thought of this before. A regular expression to match penises.
/[u|B|8]{1,2}[=\-]+[d|D|B|b][\-\.]*/
Here’s a ruby example:
ruby> "Eat B--b a bag of uu===D! 8===D---...".scan(/[u|B|8]{1,2}[=\-]+[d|D|B][\-\.]*/) => ["B--b", "uu===D", "8===D---..."]
Run…