title: Ruby - If element in array contains a certain character, return the associated element(s)
body: <p>Example:</p>
  
  <pre><code>my_array = ['2823BII','4A','76B','10J']
  </code></pre>
  
  <p>[using magical method delete_if_doesnt_contain()]</p>
  
  <pre><code>my_array.map! do |elements|
      elements.delete_if_doesnt_contain('A')
  end
  </code></pre>
  
  <p>I want that to set <code>my_array = ['4A']</code></p>
  
  <p>Even if I could iterate through an array and just return the index of the element that contains an 'A' I'd be happy.  Thanks for any help!</p>
  
  <p>Thanks for the answers below, but one more question.</p>
  
  <pre><code>other_array = ['4']
  my_var = other_array.to_s
  my_array.select!{|x| x.include?(my_var)}
  </code></pre>
  
  <p>This isn't working for me.  What am I missing?  Something happen when I converted the array to a string?</p>