title: Bash - extract substring in a string with special characters
body: <p>I'm trying to extract <code>43</code> (downloader/request_count result) in the string below:</p>
  <pre><code>OUT=&quot;[scrapy.statscollectors] INFO: Dumping Scrapy stats: {'downloader/request_bytes': 21394, 'downloader/request_count': 43, 'downloader/request_method_count/GET': 43, 'downloader/response_bytes': 1030981, 'downloader/response_count': 43, 'downloader/response_status_count/200': 43, 'item_scraped_count': 41&quot;
  </code></pre>
  <p>In a first step, I did <code>value=${OUT#*request_count\':}</code>, which return:</p>
  <pre><code>43, 'downloader/request_method_count/GET': 43, 'downloader/response_bytes': 1030981, 'downloader/response_count': 43, 'downloader/response_status_count/200': 43, 'item_scraped_count': 41
  </code></pre>
  <p>But when I try to delete right part, I get an error:</p>
  <pre><code>value2=${value%,*} 
  </code></pre>
  <p>or</p>
  <pre><code>value2=$(cut -d, -f1 $value)
  </code></pre>
  <p>Any ideas?</p>
  <p>Thanks in advance for your help!</p>