modified --need -n behavior to subtract from maxmum value.
Add -r option to specify required pattern.
wrote document for required pattern.