Can someone please let me know what this matches - i can work out some but not all:
/^\s+|\s+$/
cheers
Can someone please let me know what this matches - i can work out some but not all:
/^\s+|\s+$/
cheers
lawlz!
Maybe check all your code in a serif font first?? : )
Matches something that
[b][1] begins with
+ one or more
\s whitespace characters
| OR
$ ends with
+ one or more
\s whitespace characters
I believe. I might not be entirely correct. To test, make a string with no whitespace chars at beginning or end, make one with whitespace only at the beginning, make one with whitespace only at the end, and make one with whitespace on both ends.
If I’m right, all but the first will match.
/b ↩︎