title: Regex find CamelCase strings and dashes, replace with lowercase_underscored
body: <p>In PHPStorm, I need to find/replace some mixed case strings which are used for CSS class names and for the DOM id's. I can't change attributes like <code>onClick</code> and image names need to remain. Here is what I have: </p>
  
  <pre><code>&lt;div class="ThumbContainer" id="Source-Data4-Thumb"&gt;
  &lt;div class="ThumbTitleArea"&gt;
      &lt;div class="DataTitleDiv"&gt; GYR Performance &lt;img src="images/someImage.png" onClick="someFunc()" /&gt;&lt;/div&gt;
  &lt;/div&gt;
      &lt;div class="dataDetailArea"&gt;
      &lt;div class="DataThumbArea"&gt; Data Source:Client&lt;br&gt;
                      Last refreshed:12/05/2013 &lt;br&gt;
                      Records:206&lt;br&gt;
          &lt;br&gt;
                          Used for the following reports&lt;br&gt;
                  -    GYR Performance&lt;br&gt;
          &lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Here is what I need: </p>
  
  <pre><code>&lt;div class="thumb_container" id="source_data4_thumb"&gt;
  &lt;div class="thumb_title_area"&gt;
      &lt;div class="data_title_div"&gt; GYR Performance &lt;img src="images/someImage.png" onClick="someFunc()" /&gt;&lt;/div&gt;
  &lt;/div&gt;
      &lt;div class="data_detail_area"&gt;
      &lt;div class="data_thumb_area"&gt; Data Source:Client&lt;br&gt;
                        Last refreshed:12/05/2013 &lt;br&gt;
                        Records:206&lt;br&gt;
          &lt;br&gt;
                            Used for the following reports&lt;br&gt;
                   -    GYR Performance&lt;br&gt;
          &lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Notice the <code>dataDetailArea</code> starts with a lowercase.. bleh. This will be a one-time find/replace so it doesn't need to be in PHPStorm. It can be in any online tool even, like <a href="http://gskinner.com/RegExr/" rel="nofollow">http://gskinner.com/RegExr/</a></p>
  
  <p>The actual backbone template I need to find/replace on is about 3100 lines of code, otherwise I'd provide it all here for you.</p>
  
  <p>Here's what I have so far. It seems to not match match the <code>Camel-Case3-Foo</code>: </p>
  
  <pre><code>(class|id|data-[?!=])="\b([A-Za-z][a-z-]*){2,}\b"
  </code></pre>