#FEC-2025

use regular expression instead of trim as trim is not supported by IE8