fixed a bug of trim module when javascript is a regular expression.
bugfix.
Merge pull request #276 from taoyuanyuan/t

fixed a bug of trim module when javascript is a regular expression.