title: How do I handle an HTTP path parameter in mule Choice router?
body: <p>I am trying to use a choice router to handle HTTP messages based on their path. This works well until I hit the case where the message is being submitted with a PUT method and the trailing part of the path is the customerID. So I have a path similar to this: services/v1/customer/{custNo}. In the choice router I have:</p>
  
  <pre><code>   &lt;choice doc:name="Route Message By Path"&gt;
          &lt;when expression="message.inboundProperties['http.relative.path'] == 'services/v1/users'"&gt;
              &lt;flow-ref name="NewUser" doc:name="New User"/&gt;
          &lt;/when&gt;
          &lt;when expression="message.inboundProperties['http.relative.path'] == 'services/v1/users/{userID}'"&gt;
              &lt;flow-ref name="UpdateUser" doc:name="Update User"/&gt;
          &lt;/when&gt;
          &lt;when expression="message.inboundProperties['http.relative.path'] == 'services/v1/emails'"&gt;
              &lt;flow-ref name="CaptureEmail" doc:name="Capture Email"/&gt;
          &lt;/when&gt;
          &lt;when expression="message.inboundProperties['http.relative.path'] == 'services/v1/taxes'"&gt;
              &lt;flow-ref name="Taxes" doc:name="Taxes"/&gt;
          &lt;/when&gt;
          &lt;otherwise&gt;
              &lt;logger message="The path submitted is unknown. Submitted path is: #[message.inboundProperties['http.relative.path']]" level="INFO" doc:name="Unknown path"/&gt;
              &lt;set-payload value="The path submitted is unknown. Submitted path is: #[message.inboundProperties['http.relative.path']]" doc:name="Set Payload"/&gt;
              &lt;http:response-builder status="500" contentType="text/plain" doc:name="HTTP Response Builder"/&gt;
  
          &lt;/otherwise&gt;
      &lt;/choice&gt;
  </code></pre>
  
  <p>I have this working using rest and annotated java classes but I would rather keep it simple and in mule components if I can. Is there a way to wildcard the path in the MEL for the router? Also, if keeping with using the choice router, is there a good/simple way of extracting the customer number from the path?</p>