Rafael Ubaldo wrote in post #1016660: > It matches because it's true. The expressions states any number of > digits before the end of line. It does not state exclusively digits. >
Wrong. The regex says: 1) match start of line(or just after a newline) 2) match a digit 0 or more times 3) match just before a newline (or end of line) You cannot match start of line, followed by any number of digits, followed by the end of line unless the string contains only digits. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

