title: Alternatives to Regular Expressions
body: <p>I have a set of strings with numbers embedded in them.  They look something like /cal/long/3/4/145:999 or /pa/metrics/CosmicRay/24:4:bgp:EnergyKurtosis.  I'd like to have an expression parser that is</p>
  
  <ul>
  <li>Easy to use.  Given a few examples someone should be able to form a new expression.  I want end users to be able to form new expressions to query this set of strings.  Some of the potential users are software engineers, others are testers and some are scientists.</li>
  <li>Allows for constraints on numbers.  Something like '/cal/long/3/4/143:#>100&amp;&lt;1110' to specify that a string prefix with '/cal/long/3/4/143:' and then a number between (100,1110) is expected.</li>
  <li>Supports '|' and <em>. So the expression '/cal/(long|short)/3/4/</em>' would match '/cal/long/3/4/1:2' as well as '/cal/short/3/4/1:2'.</li>
  <li>Has a Java implementation available or would be easy to implement in Java.</li>
  </ul>
  
  <p>Interesting alternative ideas would be useful.  I'm also entertaining the idea of just implementing the subset of regular expressions that I need plus the numerical constraints.</p>
  
  <p>Thanks!</p>