From: Thomas Wieczorek Date: 2007-07-06T14:33:12+09:00 Subject: Re: Regex: What does the ^ do? What is it called? Hi > /^abc/ =~ "!abc" > returns nil > "You can use an anchor to match the beginning of a string" > Just like the definition says ^ is used to mark the beginning of a string: /^abc/ =~ "abc!" will return 0(the start of your pattern) > /abc$/ =~ "abc!" > returns nil > "You can use an anchor to match the end of a string" $ is used to mark the end of a string: /abc$/ =~ "!abc" will return 0 again. /^I love Ruby$/ will only match the string "I love Ruby" and not "He said: I love Ruby". /I love Ruby/ or /I love Ruby/$ will match /^I love Ruby$/