I have a string that looks like this:
String pathTokenString = "CMS/{brandPath}/Shows/{showPath}";
I want to remove the Shows part and everything that follows. I also want to replace "{brandPath}" with a token that I'm given.
This has been my approach. However, my string isn't getting updated at all:
//remove the '/Shows/{showPath}'
pathTokenString = pathTokenString.replace("/Shows$", "");
//replace passed in brandPath in the tokenString
String answer = pathTokenString.replace("{(.*?)}", brandPath);
Is there something wrong with my regular expressions?