67

Edits with hair don't stick

As you can see I made an edit but it won't stick and gets deleted right away; another user with 20k rep also tried to make the same edit with no luck.

This is the answer where it happened. Also I have copied it to the answers in this question; feel free to try and edit it by adding Hair, to the front.

  • 6
    Probably caused by the auto salutations removal. – Antony Oct 21 '15 at 3:58
  • 45
    Off the top of my head, pretty sure this is powered by a regex, so fixing this will potentially be a ... ⌐■_■ ... hairy situation. – Adam Lear Oct 21 '15 at 4:05
  • "Answer's"..? :( – Lightness Races in Orbit Oct 28 '15 at 1:38
  • 4
    This is not a bug but an obviously correct implementation of the no-hair-theorem – Dilaton Nov 7 '15 at 14:37
27

Hair,

You can get a temporary workaround by adding an invisible comment using <!-- --> at the beginning of your answer. Then you can add 'Hair' after it. I agree though that this needs to be fixed.

  • 1
    Making it bold also works. – Shadow The Curly Braced Wizard Oct 21 '15 at 19:30
  • or adding <img></img> before – Aequitas Oct 22 '15 at 2:22
  • @ShadowWizard Yes, but you can see that. This is invisible. – wythagoras Oct 22 '15 at 16:40
  • See here, adding unicode character "Zero Width Space" also works. I'll post a comment consisting only of those so it's easier to copy, let me try.. oh, not making it easier to copy. Ways to type this character are described here. :) – Shadow The Curly Braced Wizard Oct 22 '15 at 17:44
  • 15
    ​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​ – Shadow The Curly Braced Wizard Oct 22 '15 at 17:44
  • @ShadowWizard and here if you're not using a laptop keyboard, ie alt08203 – Aequitas Oct 23 '15 at 3:31
  • @ShadowWizard - surely you meant bald*= – Deer Hunter Oct 24 '15 at 9:10
13

We have performed a Hair removal removal. Having said that:

http://www.youtube.com/watch?v=ozQ8qLMKW_s#t=1m28s

Hair is no longer trimmed, cut, stripped, or buzzed.

10

Hair, and particularly facial hair, is a sort of defense. It's harder to take a bite of someone's throat, or scratch their throat if it's covered in hair.

So in a jungle setting there can be predators that prey on humans, but if they have longer facial hair they will be more likely to survive.

Granted this doesn't depend on how fast it is, so an additional thing could be that there is a micro organism that feeds of dead cells (which includes hair) so it is impossible to grow a beard very long because it gets all eaten after a certain amount of time. In this case the faster that the hair grows the longer the beard can be and thus the more protection it offers the person and thus increases their chance of survival.

  • I don't get the point of this answer, nor all the edits. – Patrick Hofman Oct 21 '15 at 8:01
  • 4
    @PatrickHofman - the point is testing the limits of the hairy bug. – Deer Hunter Oct 21 '15 at 8:20
  • @PatrickHofman consider this to be posted on a Friday – rene Oct 21 '15 at 8:23
  • 7
    The answer just proves OPs point, for testing you can use the Sandbox. – Patrick Hofman Oct 21 '15 at 8:25
  • 5
    The sandbox is not hairy enough. – Deer Hunter Oct 21 '15 at 8:35
  • 1
    @Pat true, but actually it's convenient to have it here. OP should make it CW though. – Shadow The Curly Braced Wizard Oct 21 '15 at 8:35
  • 2
    This must be the best off-topic answer there is – Anthony Pham Oct 21 '15 at 23:16
  • @PythonMaster meta.stackexchange.com/a/210452/260841 ;) – ᔕᖺᘎᕊ Oct 23 '15 at 9:31
9

the icy ball form of precipitation - induce the same bug.

The regex is attempting to defeat an initial "hai" (as in o hai), but is over-zealous.

The regex being:

^                 # begins at start of body
\s*               # possible spaces
(
hii?(?![a-z])|    # any of these greeting words
hello|
h(e|a)y(?![a-z])|
dear|
greetings|
hai|
guys|
howdy|
h(i|e)ya|
hola
)
.*?               # followed by anything, up to...
(
[.,;!-]+          # one or more bits of punctuation
\s*               # possible spaces
|
(\r?\n)+          # one or more newlines
)
  • 1
    Running that regex against /usr/share/dict/words, the only problematic entry is hai, which matches a variety of "hail" and "hair" words (plus "Haiti" and "Haitian"). dear matches a few, but they're all uncommon or are derivatives of "dear" such as "dearest". Nothing else generates false positives. – Mark Oct 24 '15 at 1:52
  • 1
    Running it against the list of article titles on Wikipedia, hai is again the main problem one, although hola generates a fair few false positives as well. dear and hello generate a bunch of hits, but they're almost all titles in the form of greetings, except for variations on "Dearborn". – Mark Oct 24 '15 at 1:57
  • 3
    How about hay, in a hypothetical answer on the bio stack, on what to feed cows? – SQB Oct 25 '15 at 23:01
  • 9
    Hay una problema with banning "hay" for the Spanish site too, probably – user568458 Oct 26 '15 at 10:53
  • 3
    The regex should not modify the post text but just display a popup saying "Please don't include salutations" or something alike. This would 1) educate the user, and 2) allow for legitimate word usage in case of false positive. – Konamiman Oct 26 '15 at 11:57
  • 2
    looool do people really try to start posts with "hai"???? (wow that regex is terrible... at least chuck in a \b for goodness's sake!!!) – Lightness Races in Orbit Oct 28 '15 at 1:39
8

Considering the regex used seems to be:

^                 # begins at start of body
\s*               # possible spaces
(
hii?(?![a-z])|    # any of these greeting words
hello|
h(e|a)y(?![a-z])|
dear|
greetings|
hai|
guys|
howdy|
h(i|e)ya|
hola
)
.*?               # followed by anything, up to...
(
[.,;!-]+          # one or more bits of punctuation
\s*               # possible spaces
|
(\r?\n)+          # one or more newlines
)

Replacing the .*? by something that matches less should fix it. My suggestions:

  • (\W.*?)? makes sure that any of the bad words is followed by a non-word character before matching anything else
  • \b.*? makes sure we're at a word boundary before matching the rest

Putting it together and removing superfluous bits

^                 # begins at start of body
\s*               # possible spaces
(                 # any of the following greeting words
h[ai]i?|
hello|
h[eai]ya?|
dear|
greetings|
hai|
guys|
howdy|
hola
)
\b                # word boundary, to not match words that begin with a bad word
.*?               # followed by anything, up to...
(
[.,;!-]+          # one or more bits of punctuation
\s*               # possible spaces
|
[\r\n]+          # one or more newlines
)

Of course, you should check this against your unit tests. You do use unit tests, don't you?

And this would still match a useful answer on [workplace.se] that reads

Greetings should be exchanged as soon as you enter the room for your interview.

or

Dear or howdy is much to informal for a letter to a supplier.

or, over on [musicfans.se]

Guys 'n' Dolls is probably the band you're looking for.

So I agree that a pop-up alerting the user might be better.

You must log in to answer this question.

protected by Community Oct 21 '15 at 20:56

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged .