Java Regex to remove all words after a key till end key

Java Regex to remove all words after a key till end key

newstr = str.replaceAll({[^}]*}, );

Modified the answer from this question: How to remove entire substring from < to > in Java

Java Regex to remove all words after a key till end key

Leave a Reply

Your email address will not be published. Required fields are marked *