dkim18
asked on
Javascript String trim
Hi Experts,
I am trying to trim string in javascript in both ways, but nothing works(IE9).
str.replace(/^\s+|\s+$/g, '')
str.trim()
what am I doing wrong?
thanks,
I am trying to trim string in javascript in both ways, but nothing works(IE9).
str.replace(/^\s+|\s+$/g, '')
str.trim()
what am I doing wrong?
thanks,
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Check if you are having a special character and you think it is a space...