Hi,
Sorry, a newbie question here:
I encountered the following code:
Code:var temp = somestring; temp = temp.replace( /^\s*/, "" ); temp = temp.substring(0,6);
Doesn't this mean replace zero or more occurrences of non-whitespace with the empty string?
If so, I don't see how the 3rd line of code will ever return anything but whitespace. Am I off the mark?


Reply With Quote

Bookmarks