Why not drop the -h option to du in favour of -a (to report all files in a directory) and -b (to report byte sizes) so it outputs exact file sizes that you can compare or sort . man du is your friend.
On top, it might not match your (erroneous) regexes.
rev=""
if [ $# -gt 0 ]
then
if [ $1 = '-r' ]
then
rev="r"
# echo $rev
shift
fi
fi
ls -l $* |grep -v "total " |sort +4n$rev -5 +8 |more -e
It lists all files (or star name convention) in increasing size or, with "-r" as the first parm, in decreasing size. Ties are alphabetical by file name.
At the extreme, find /path/to/dir -type f -ls | sort -bnk 7 might do the trick, but you have to be sure that there are no groups or user names with spaces in them as that will appear to add extra columns.
Using du -h is for human readable output. Follow the advice of RudiC to get output you don't need to mess about with too much for the machine to understand.