G
geoffrobinson
I've noticed that the following regular expression is offered pretty
frequently on message boards and on various and sundry websites in
conjuction with the string class replace function:
str.replace(/^\s*|\s*$/g,"")
I'm trying to use it and it is only stripping off leading whitespaces,
not trailing.
Does anyone have any insights?
thanks,
Geoff
frequently on message boards and on various and sundry websites in
conjuction with the string class replace function:
str.replace(/^\s*|\s*$/g,"")
I'm trying to use it and it is only stripping off leading whitespaces,
not trailing.
Does anyone have any insights?
thanks,
Geoff