title: Remove matching String using regular Expression in java
body: <p>This is my code please check. At the End i want to remove list-style-image: url(images/dot.gif); from the String</p>
  
  <pre><code>String temp = "font-family: Arial, Helvetica, sans-serif;font-size: 11px;color: F143F;list-style-image: url(images/dot.gif);list-style-type: none;"; 
  
  Pattern pxPattern = Pattern.compile("([a-z]+-)+([a-z]+):(\\s)url\\(.*?\\);");
  
  Matcher pxMatcher = pxPattern.matcher(temp);
  
  while(pxMatcher.find()) {
      System.out.println(pxMatcher.group());
      String urlString =pxMatcher.group();
      if(!urlString.matches("http://|https://")) {
          System.out.println("Firts: "+temp.trim());
          System.out.println(urlString);
          System.out.println(temp.replaceAll(urlString, ""));
          //System.out.println("Remove: "+temp);
      }
  }
  </code></pre>