OK, there is something pretty close I came up with: "<[^((\\s*A)|(\\s*I))].*?>"
... but it also removes the closing tags /A and /I while leaving A and I in place. How to remove closing tags? On Jun 15, 11:45 am, vunet <vunet...@gmail.com> wrote: > If this strips my HTML out of the string: > > str.replaceAll("<.*?>",""); > > ...how can I strip everything excluding, say, A and I tags? Basically > I want to keep <a> and <i> tags. Please suggest. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Java EE (J2EE) Programming with Passion!" group. To post to this group, send email to java-ee-j2ee-programming-with-passion@googlegroups.com To unsubscribe from this group, send email to java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en -~----------~----~----~----~------~----~------~--~---