Skip to content

Comment on Ask HN: Please review. Are we making something that people want?parent

Comments

It's pretty easy to do number 1. use a regex ([0-9]*) and check if there is more than one group of matched values. If there is more than one group then you can either error it out or do some more sophisticated checking(i.e. 100 meal at 10:50pm, two numbers but easy to discern what the intent was) number two is a bit more difficult but still fairly easy.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.