Change tags in symbol Pattern/Matcher
===

This code works fine :
   

    final String result = myString.replaceAll("<tag1>", "{").replaceAll("<tag2>", "}");

but I have to parse big files, so I'm asking me if I can have a `Pattern.compile("REGEX");` before the `while` :

    Patter p = Pattern.compile("REGEX");
    while(scan.hasNextLine()){
         final String myWorkLine = scan.readLine();
         p.matcher(s).replaceAll("$1"); // or other value
         ..;
    }

I expect faster result because regex compilation is maid once and only once.