From: Hal Fulton Date: 2003-08-27T06:23:27+09:00 Subject: Re: Specification of Ruby regex? >>> Ruby's regular expressions are almost identical to Perl's. >> >> Except where they are different. The biggest glaring difference is that >> ^ and $ do not mean "match start of string" and "match end of string" >> >> a.untaint if /^[a-z]+$/ =~ a # WRONG and maybe dangerous >> a.untaint if /\A[a-z]+\z/ =~ a # right >> >> Regards, >> >> Brian. >> > what do ^ and $ mean then? they do match start and end for me. what > else do they match? *shudders at thought of changing lots of code Correct me if I'm wrong. (Famous last words on most newsgroups.) Isn't it an issue only in multiline mode? In that case, I think ^ and $ would match the start and end of the line rather than the entire string. Hal