5 ms·
(some of the stars got stripped by HN so the above won't work) Try putting a couple of spaces in front of your code line, like this: cat file | perl -p -e "
by nitrogen 16y ago
(some of the stars got stripped by HN so the above won't work)
Try putting a couple of spaces in front of your code line, like this:
cat file | perl -p -e "s/.*from ([0-9\.]+).*/\1/g"
See http://news.ycombinator.com/formatdoc http://news.ycombinator.com/formatdoc
Edit: for simple regexes, sed works well, too, and probably loads slightly faster than perl.