Refine the on method regexp rule to make it more readable

/[^\s]+/g equals to /\S+/g, but the former is hard to understand.