title: Array map with regular expression
body: <p>I have an array as below:</p>
  
  <pre><code>arr = [
    nil,
    6,
    "17 to 23 ||'.'||24 to 25 (add a decimal at 10th place)",
    nil,
    nil,
    "37 to 51 ||'.'||52 to 53 (add a decimal at 100th place)",
    nil
  ]
  </code></pre>
  
  <p>I want to convert this array into the following:</p>
  
  <pre><code>arr = [
    nil,
    6,
    "10th",
    nil,
    nil,
    "100th",
    nil
  ]
  </code></pre>
  
  <p>i.e from the string <code>"17 to 23 ||'.'||24 to 25 (add a decimal at 10th place)"</code>, I need the digits mentioned in the bracket.</p>
  
  <p>I tried the following code, but its not working:</p>
  
  <pre><code>arr.map! {|e| e[/^.*?add.*?(\d+)th.*?$/]}
  </code></pre>