import java.util.*;
import java.io.*;
import java.util.regex.*;
import java.util.List;
class Program {
String subject
= "audio*2012*.wav"; Pattern regex = Pattern.compile("[^*]+|(\\*)");
Matcher m = regex.matcher(subject);
while (m.find()) {
if(m.group(1) != null) m.appendReplacement(b, ".*");
else m.appendReplacement(b, "\\\\Q" + m.group(0) + "\\\\E");
}
m.appendTail(b);
String replaced
= b.
toString(); } // end main
} // end Program
aW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5pby4qOwppbXBvcnQgamF2YS51dGlsLnJlZ2V4Lio7CmltcG9ydCBqYXZhLnV0aWwuTGlzdDsKCmNsYXNzIFByb2dyYW0gewpwdWJsaWMgc3RhdGljIHZvaWQgbWFpbiAoU3RyaW5nW10gYXJncykgdGhyb3dzIGphdmEubGFuZy5FeGNlcHRpb24JewoKU3RyaW5nIHN1YmplY3QgPSAiYXVkaW8qMjAxMioud2F2IjsKUGF0dGVybiByZWdleCA9IFBhdHRlcm4uY29tcGlsZSgiW14qXSt8KFxcKikiKTsKTWF0Y2hlciBtID0gcmVnZXgubWF0Y2hlcihzdWJqZWN0KTsKU3RyaW5nQnVmZmVyIGI9IG5ldyBTdHJpbmdCdWZmZXIoKTsKd2hpbGUgKG0uZmluZCgpKSB7CiAgICBpZihtLmdyb3VwKDEpICE9IG51bGwpIG0uYXBwZW5kUmVwbGFjZW1lbnQoYiwgIi4qIik7CiAgICBlbHNlIG0uYXBwZW5kUmVwbGFjZW1lbnQoYiwgIlxcXFxRIiArIG0uZ3JvdXAoMCkgKyAiXFxcXEUiKTsKfQptLmFwcGVuZFRhaWwoYik7ClN0cmluZyByZXBsYWNlZCA9IGIudG9TdHJpbmcoKTsKU3lzdGVtLm91dC5wcmludGxuKHJlcGxhY2VkKTsKfSAvLyBlbmQgbWFpbgp9IC8vIGVuZCBQcm9ncmFt