package leetcode;

/**
 * https://leetcode.com/problems/html-entity-parser/
 */
public class Problem1410 {
    public String entityParser(String text) {
        // TODO
        return null;
    }

    public static void main(String[] args) {
        Problem1410 prob = new Problem1410();
        System.out.println(prob.entityParser("&amp; is an HTML entity but &ambassador; is not.")); // "& is an HTML entity but &ambassador; is not."
        System.out.println(prob.entityParser("and I quote: &quot;...&quot;")); // "and I quote: \"...\""
        System.out.println(prob.entityParser("Stay home! Practice on Leetcode :)")); // "Stay home! Practice on Leetcode :)"
        System.out.println(prob.entityParser("x &gt; y &amp;&amp; x &lt; y is always false")); // "x > y && x < y is always false"
        System.out.println(prob.entityParser("leetcode.com&frasl;problemset&frasl;all")); // "leetcode.com/problemset/all"
    }
}

@@ -158,767 +158,251 @@
     
-// TODO%0A        return null;%0A
+return text%0A   
     
-%7D%0A%0A
     
-public static void main(String%5B%5D args) %7B%0A        Problem1410 prob = new Problem1410();%0A        System.out.println(prob.entityParser(%22&amp; is an HTML entity but &ambassador; is not.%22)); // %22& is an HTML entity but &ambassador; is not.%22%0A        System.out.println(prob.entityParser(%22and I quote: &quot;...&quot;%22)); // %22and I quote: %5C%22...%5C%22%22%0A        System.out.println(prob.entityParser(%22Stay home! Practice on Leetcode :)%22)); // %22Stay home! Practice on Leetcode :)%22%0A        System.out.println(prob.entityParser(%22x &gt; y &amp;&amp; x &lt; y is always false%22)); // %22x %3E y && x %3C y is always false%22%0A        System.out.println(prob.entityParser(%22leetcode.com&frasl;problemset&frasl;all%22)); // %22leetcode.com/problemset/all%22
+ .replaceAll(%22&quot;%22, %22%5C%22%22)%0A            .replaceAll(%22&apos;%22, %22'%22)%0A            .replaceAll(%22&gt;%22, %22%3E%22)%0A            .replaceAll(%22&lt;%22, %22%3C%22)%0A            .replaceAll(%22&frasl;%22, %22/%22)%0A            .replaceAll(%22&amp;%22, %22&%22);
 %0A   

Solve problem 1410