From: mgarriss Date: 2003-08-27T06:15:25+09:00 Subject: Re: Specification of Ruby regex? Brian Candler wrote: >On Tue, Aug 26, 2003 at 05:37:12PM +0900, Mark Wilson wrote: > > >>>I was just wondering... Is there any place where Ruby's Regex >>>capabilities are described? >>> >>>[snip] >>> >>> >>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 Michael