Confused about Regular Expressions
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?