title: replace the string with dynamic alphanumeric characters using regex
body: <p>Suppose I have a file which have one string value along with dynamic alphanumeric characters .
  So I need to replace the string with null characters .</p>
  
  <p>String : </p>
  
  <blockquote>
    <p>preso1DA7B5FB-01B4-8AB8-B8B2-93B7118ED92B</p>
  </blockquote>
  
  <p>Here preso will be always constant and other alphanumeric characters will keep on changing (Dynamic value).</p>
  
  <p>How to write regex expression for string <br>
  My regex is : </p>
  
  <blockquote>
    <p>preso.*?\n</p>
  </blockquote>
  
  <p>public class PatternSearchAndReplace {</p>
  
  <pre><code>public String replaceWithPattern(String str,String replace){
  
      Pattern ptn = Pattern.compile("(?&lt;=preso).*");
      Matcher mtch = ptn.matcher(str);
      return mtch.replaceAll(replace);
  }
  
  public static void main(String a[]){
      String str = "Hello_preso1D88B7B3-FE77-7A3D-9758-C3820B6D83FB/cfslideshow.js";
      PatternSearchAndReplace mpr = new PatternSearchAndReplace();
      System.out.println(mpr.replaceWithPattern(str, " "));
  }
  </code></pre>
  
  <p>}</p>
  
  <p>Output I wanted is : Hello_/cfslideshow.js</p>