package com.valerysamovich.java.regex;

public class RegexMatches {
    
    public static void main(String args[]) {
        
        // String to be scanned to find the pattern
        String line = "This order was placed for QT3000! OK?";
        String pattern = "(.*)(\\d+)(.*)";
    }

}

@@ -33,16 +33,43 @@
 regex;%0A%0A
+import java.util.regex.*;%0A%0A
 public c
@@ -198,16 +198,17 @@
  pattern
+.
 %0A       
@@ -263,16 +263,16 @@
 ! OK?%22;%0A
-
         
@@ -306,16 +306,263 @@
 )(.*)%22;%0A
+        %0A        // Create a Pattern object.%0A        Pattern r = new Pattern();%0A        r.compile(pattern);%0A        %0A        // No create matcher object.%0A        Matcher m = r.matcher(line);%0A        %0A        // TO-DO: Test and Output... %0A        %0A
     %7D%0A%0A%7D

Create Pattern object