![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
The same regexp that seems to be working on the server side in Perl seems to be failing on the client side in JavaScript... I want to match a string that's exactly 7 alpha-numeric characters. So I used... var reSCode = /^[a-zA-z0-9]{7}$/; |
#3
| |||
| |||
|
| Too legit to shift. var reSCode = /^[a-zA-Z0-9]{7}$/; |

#4
| |||
| |||
|
| Douglas Crockford wrote: Too legit to shift. var reSCode = /^[a-zA-Z0-9]{7}$/; Say what? ![]() --wmc. |
#5
| |||
| |||
|
|
OK, so "Too legit to shift." is pretty cryptic, but what he correctly pointed out is that these two lines: var reSCode = /^[a-zA-z0-9]{7}$/; // Your version var reSCode = /^[a-zA-Z0-9]{7}$/; // Douglas Crokford's version. are not the same, and therein lies your problem. "williamc" <temp4_NO_SPAM_ (AT) williamc (DOT) com> wrote in message news:3F71DE3A.3E9C9F2C (AT) williamc (DOT) com... Douglas Crockford wrote: Too legit to shift. var reSCode = /^[a-zA-Z0-9]{7}$/; Say what? ![]() --wmc. |
#6
| |||
| |||
|
|
Doh... One of those staring right at deals. Altho I still don't know what "Too legit to shift" means... thx all, -wmc... Dana Cartwright wrote: OK, so "Too legit to shift." is pretty cryptic, but what he correctly pointed out is that these two lines: var reSCode = /^[a-zA-z0-9]{7}$/; // Your version var reSCode = /^[a-zA-Z0-9]{7}$/; // Douglas Crokford's version. are not the same, and therein lies your problem. "williamc" <temp4_NO_SPAM_ (AT) williamc (DOT) com> wrote in message news:3F71DE3A.3E9C9F2C (AT) williamc (DOT) com... Douglas Crockford wrote: Too legit to shift. var reSCode = /^[a-zA-Z0-9]{7}$/; Say what? ![]() --wmc. |
#7
| |||
| |||
|
|
That's when you feel that with your parachute pants, your mind for rhyme, and your two hype feet, you can't be bothered to hit the "shift" key. |
![]() |
| Thread Tools | |
| Display Modes | |
| |