move re out of loop to boost performance
Merge pull request #29 from liyu1981/master

move re out of loop to boost performance