package string; public class MainString { public static void main(String[] args) { // TODO Auto-generated method stub String s = "This is a string"; //s.replaceAll("aeiou", ""); removevowels(s); } public static void removevowels(String s) { String s1 = s.replaceAll("[aeiou](?!\\b)", ""); //String s1 = s.replaceAll("aeiou", ""); System.out.println(s1); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)