title: Regex for key value in java
body: <p>i'm trying to create a regExp for this strings in java :</p>
  
  <pre><code>key:value
  key:"value" 
  key:'value' 
  key : value  
  key :"value 123" 
  key: 'value 123'
  </code></pre>
  
  <p>every condition can be in a single line :</p>
  
  <pre><code>key:value key : value key : "value 123"
  </code></pre>
  
  <p>i've to match each of them, capturing key and value, trimmed and without quotes.</p>
  
  <p>unfortunately java does not support conditionals in regex.</p>
  
  <p>Can someone help me?</p>
  
  <p>Thanks in advance.</p>