1 2 3 4 5 6 7 8 9 10 11 12 | 1 1 42 42 1 | define(['../lang/toString'], function(toString){ /** * Remove non-word chars. */ function removeNonWord(str){ str = toString(str); return str.replace(/[^0-9a-zA-Z\xC0-\xFF \-]/g, ''); } return removeNonWord; }); |