How do I convert a camelCase string to underscore in java keeping some upper cases and the rests as lower cases?
<p>How do I convert a camel case string to underscore in java keeping some upper case letters? I'm usin this code:</p>

<pre><code>String inputString = "Hi How areYouToday";
String result = inputString.replaceAll("([a-z])([A-Z]+)", "$1_$2");   
</code></pre>

<p>I can convert inputString in <code>Hi How are_You_Today</code>, but, I need to get <code>Hi How are_you_today</code>. </p>

<p>Notice that only converted part is changed to lower case version.</p>