Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

echo "jd; John Doe; 99; None; john.doe@whoknows.com; ; ." | cut -d ";" -f 5

...so if someone makes mistakes it is automatically out :-)

Guess the way they chose is the best though.



If they do that, then they should specify how to escape literal semicolons so that Robert'); DROP TABLE students;-- doesn't file a discrimination lawsuit.


Or, if they're in a forgiving mood, this will produce one e-mail address per line, regardless of delimited position, (assuming the founders were already on separate lines):

 | sed -E 's/^.*[^[:alnum:]\._\-]([[:alnum:]\._\-]+@[[:alnum:]][[:alnum:]\-]+\.[[:alnum:]][[:alnum:]\-\.]*)[^[:alnum:]\-\.].*$/\1/' 
 | grep -E '^[[:alnum:]\._\-]+@[[:alnum:]][[:alnum:]\-]+\.[[:alnum:]][[:alnum:]\-\.]*$'


Please avoid long one-liners in code blocks. It forces all of us to scroll left and right to read the rest of the page.


My bad... Split into two lines, hopefully that helps.


666 lord do you know where i am^^^


6666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: