View Single Post
  #23 (permalink)  
Old June 8th, 2005, 04:34 PM
AGS AGS is offline
Wrox Technical Editor
Points: 267, Level: 5
Points: 267, Level: 5 Points: 267, Level: 5 Points: 267, Level: 5
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2005
Location: Russia
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Page 204. Reluctant quantifier "behind the scenes" behaviour examples.
There are definitely superfluous "//true – match!" comments instead of "//false - no match":
Code:
re2.test(“a”); //false - no match
re2.test(“aa”); //false - no match
re2.test(“aab”); //false - no match
re2.test(“aabb”); //true – match!
re2.test(“aabbb”); //true – match!
//store this result and start with next letter
re2.test(“a”); //false - no match
re2.test(“aa”); //false - no match
re2.test(“aaa”); //false - no match
re2.test(“aaab”); //true – match!
re2.test(“aaabb”); //false - no match
re2.test(“aaabbb”); //true – match!
//store this result and start with next letter
Best regards,
Alexei

Reply With Quote