I do dislike people calling that expression a "regex", because it isn't: regular expressions cannot contain backreferences, and must be computable in linear time, whereas primality tests are polynomial.
http://news.ycombinator.com/item?id=1486502
full comment thread here http://news.ycombinator.com/item?id=1486158
I suppose I could accept "regex" as not being a regular expression as such, but the two are used so interchangeably that maintaining a distinction isn't very realistic. I'd personally rather a regular expression described a regular language, and "PCRE" (or so) used for the Turing-complete expressions with a similar syntax.
So I'd argue that code is RegEx.
I guess it's just a matter of perspective though.