Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

oops,

  ^(?!.*(.)(.)\2\1).*$
With proper formatting hopefully.


sort by: page size:

This should work:

  \*\*\*

for easier remembering and correctly formatted:

    *#*#INFO#*#*

A personal common favorite:

    "(?:[^\\"]|\\.)*"

I was wondering the same thing too. And even if you wanted to keep this odd behaviour, it could be better written as

  /^[izehsglbo][izehsgl]o?$/

I think you mistyped J code. I don't know any J but what I understood from your comment that it should be something like

  </ +. >/ *.

Either

  \*
or

  **

that

    ''"${1}"'d'
is needlessly complicated. this would do the same:

    "${1}d"

    4JD=Gjwci(*a^]jcfda.join(',')^]
God this is addicting. Shaved off a few characters.

edit: switch the first three letters to j3D, as 4JD seems to work differently between my two machines.


  :%s/^printf("@%d\\n", __LINE__);$//

> (hacker news is clobbering the spaces after ^)

Indent with 2 spaces to get code formatting: https://news.ycombinator.com/formatdoc


  /^\(\S*\)\s*\S*\s*\S*\s*\(\p*\)
  :%s//{\1, "\2"},
"Now they have two problems."

    &\&^&]&[&Z&]&^&\ 
    &_&_&_&_&_&_&_&_ 
      %?  %?  %?  %? 
    %?  %?  %?  %? 
      %?  %?  %?  %? 
    %?  %?  %?  %? 
    &Y&Y&Y&Y&Y&Y&Y&Y 
    &V&X&W&U&T&W&X&V

This is what I get.

Fixed formatting

  _,-*^*-,_,-*^*-,_,-*^ Enter 33 for /\/\ /\/\ ^*-,_,-*^*-,_,-*^*-,_,-*^*-,_

The formatting along this entire thread is so bad due to accidental asterisk-induced italics that I cant follow much of it at all. It would help posters to learn that you can force a * without any risk of italics if you put a backslash in front of the asterisk to escape it.

You can also put four spaces in front of the line to automatically escape all formatting characters.

    *this has four spaces in front of it and no escape characters*

I was on my phone when I posted the above, so couldn't easily look up the exact way it's:

  {asterisk}

  ^(?!.*(.)(.)\2\1)
You may also need to fill in the places where it could be anything. The above worked on abba for me.

BTW a double space indent then formats as code on HN I think.


Tip: you can use four leading spaces to write code.

    Like this

... and ignoring case obviously gets us down here:

    ^[a-z]([a-z]+|\d+)@[a-z]+\.[a-z]+$

Not sure if that would look better:

    _____________
   /       /.....\
  (       (.......)
   \_______\_____/
next

Legal | privacy