Michael wrote:
> This is awesome - I am totally almost getting this!
> What if my Coupon Code started at some number mid sequence - like
> everything
> greater then
> C32456 would be valid...

It's almost always a pain to work with numeric ranges in regex. I
think the best option in this case is to parse sequence as a number
and just use comparison operators. Something like:

var passed = false;
var match = 'C32456'.match(/\d+/);
if (match && match[0]) {
  match = parseInt(match);
if (!isNaN(match)) {
 passed = (match > 1234);

// etc.


You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to