title: What do =~ and /\ mean in Ruby?
body: <p>I've been teaching myself Ruby and for a certain problem I'm trying to solve I notice a lot of people are using <code>=~</code> and <code>/\</code> in their code.  I'm not really sure how they work and would just like an explanation.  For example I was looking at someones code for this Pig Latin translator and this is the first time I'm seeing these being used.</p>
  
  <pre><code>def piglatin(word)
     if word =~ (/\A[aeiou]/i)
        word = word + 'ay'
     elsif word =~ (/\A[^aeiou]/i)
        match = /\A[^aeiou]/i.match(word)
        word = match.post_match + match.to_s + 'ay'
     end
  word
  end
  </code></pre>
  
  <p>I'm just confused about the <code>/\</code> slashes and the <code>=~</code></p>