How to use multiple different patterns?
<p>how to check strings for multi-pattern regex not for single pattern if tried for one pattern but I need it for multi-pattern and i tried but it doesn't work.
when I running these codes just I can get one of them (time or price ) that is in the String but when I combine them don't show me any output. </p>

<p>thanks for your help....</p>

<p>here is my code :</p>

<pre><code> String line = "This order was  places for QT 30.00$ ! OK? and time is 2:45";
      String pattern = "\\d+[.,]\\d+.[$]"+"\\d:\\d\\d";

      // Create a Pattern object
      Pattern r = Pattern.compile(pattern);

      // Now create matcher object.
      Matcher m = r.matcher(line);
      if (m.find( )) {
         System.out.println("Found value: " + m.group(0) );

      } else {
         System.out.println("NO MATCH");
      }
</code></pre>
