♻ Regexps gone wrong

| No TrackBacks

Listening to Pandora today, I saw a sad sight: a poorly written regular expression let loose on the world.

The “about this artist” tab showed the following (excerpt):

Nappy Roots began making music together at a local record shop-c*m-studio named ET’s Music, and released their full-length debut, Country Fried Cess, in 1998.

What? “shop-c*m-studio”?

It took me a second to realize that someone wrote a regular expression (perhaps \bcum\b) assuming that every instance of the word “cum” was… obscene, and not thinking about the combining preposition.

Perhaps this isn’t a case of bad regular expressions, but a bigger statement about the word. Maybe the implementor of the regular expression thought it was dirty. Do kids today know this word has some other (more legitimate) meaning? At least x-cum-y is pronounced differently (koŏm) than the obscene word (kəm). On the other hand, “anal” (as in “anal-retentive”) is pronounced the same as the other anatomical adjective, and we don’t snicker when we hear that… do we?

No TrackBacks

TrackBack URL: http://tr.ashcan.org/mt/mt-tb.cgi/190