title: What does the /^ symbol mean in Ruby?
body: <p>A friend of mine is trying to explain to me the answer to this problem:</p>
  
  <blockquote>
    <p>Define a method binary_multiple_of_4?(s) that takes a string and returns true if the string represents a binary number that is a multiple of 4.</p>
  </blockquote>
  
  <p>However, his example he gave is this: </p>
  
  <pre><code>if (s) == "0"
      return true
  end
  if /^[01]*(00)$/.match(s) #|| /^0$/.match(s)
      return true
  else
      return false
  end
  </code></pre>
  
  <p>It works, because the software we use says there were no errors, but I don't understand why, or what /^ means, and how it's used.</p>
  
  <p>If you could also explain the /^0$/.match(s), that would be great too.</p>
  
  <p>Thanks!</p>