in reply to Re: Questions: how to exclude substring having Evil meanings
in thread Questions: how to exclude substring having Evil meanings

At least until someone gets in a huff about getting a code SH1T455 or 455H0L3 or . . . :)

There's always Regexp::Common::profanity (and variants specialized for other locales and languages), but you'd (the OP, that is) want to examine them to make sure they handle everything you're worried about.

Update: Or another idea: just use a hex representation of the record number (which'll be longer than 7 chars, but you'll only have to worry about offending Hindus or vegans with DEADBEEF :).

The cake is a lie.
The cake is a lie.
The cake is a lie.

  • Comment on Re^2: Questions: how to exclude substring having Evil meanings

Replies are listed 'Best First'.
Re^3: Questions: how to exclude substring having Evil meanings
by roboticus (Chancellor) on Dec 02, 2009 at 17:14 UTC

    Too true ... I think the problem is somewhat artificial, as people can find all sorts of things to be unreasonable about. ;^)

    Sure, we could omit digits that look like vowels from the alphabet (0, 1, 3, 4), but then someone'll complain about stuff when you turn the code upside down or some such.

    ...roboticus
Re^3: Questions: how to exclude substring having Evil meanings
by AnomalousMonk (Archbishop) on Dec 03, 2009 at 01:34 UTC
    ... you'll only have to worry about ...  DEADBEEF ...

    I once had someone complain to me – only semi-facetiously – about the presence of 666 in some identifier or other. And then you have to worry about 13 (Europe/NA), 4 (China), etc., etc.

      Don't forget about the possibility that they might be standing on their heads when they see "5318008".