Facebook
From Crippled Armadillo, 5 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 245
  1. import java.util.regex.Matcher;
  2. import java.util.regex.Pattern;
  3.  
  4. public class MyClass {
  5.     public static void main(String args[]) {
  6.         String line = "tu wklej linki";
  7.        
  8.         String pattern = "!(.*?)/";
  9.         Pattern r = Pattern.compile(pattern);
  10.         Matcher m = r.matcher(line);
  11.        
  12.         while (m.find()) {
  13.             String match = m.group();
  14.             System.out.print(match);
  15.         }
  16.        
  17.        
  18.        
  19.     }
  20. }