- local A B a b
- A=$(echo $1 | sed "s/[0-9]*/ & /g")
- B=$(echo $2 | sed "s/[0-9]*/ & /g")
- while [ \! -z "$A" ] && [ \! -z "$B" ]; do {
+ local A B a b
+ A=$(echo $1 | sed -r "s/([0-9]+)[^[:alnum:]]*/ \1 /g").
+ B=$(echo $2 | sed -r "s/([0-9]+)[^[:alnum:]]*/ \1 /g").
+ while [ \! -z "$A" ] && [ \! -z "$B" ]; do {