takes input and sorts it by value

## what
  created regex for first word of line taken from STDIN