title: What Regex matches this String?
body: <p>How do I get the regular expression for this <code>String</code>: </p>
  
  <pre><code>$OK:COMMAND=4,45,,internet,,,60.210.45.68,1050,30,168.95.1.1
  </code></pre>
  
  <p>I have tried this one but it seems that it doesn't work: </p>
  
  <pre><code>public static final String commandMotif = "^\\$OK:COMMAND=(\\w){0,1},(\\w){0,1},(\\w){0,1},(\\w){0,1},(\\w){0,1},(\\w){0,1},(\\w){0,1},(\\w){0,1},(\\w){0,1},(\\w){0,1}";
  </code></pre>
  
  <p>NB : I can have some data between two comma but it can also be empty sometimes.</p>