Ryan Minor

Ryan Minor

  • NA
  • 12
  • 0

Confused about Regular Expressions

Aug 21 2009 9:08 AM
I am using the Regular Expression class to parse a string. I downloaded a RE tester which seems to be working fine. The problem I am finding is that my regular expressions do not evaluate properly when I switch the order. For example: (?[0-9]+)|(?[a-zA-Z_$][a-zA-Z0-9_$]*)|(?\s*) finds the integers but if I move it to the end, it does not: (?[a-zA-Z_$][a-zA-Z0-9_$]*)|(?\s*)|(?[0-9]+) Are there ordering rules?

Answers (1)