import java.util.Scanner;
      class RemoveCharactersInAtringExceptAlphabets {
      public static void main(String[] args) {
           Scanner sc =new Scanner(System.in);
           System.out.print("Enter String : ");
           String s = sc.nextLine();
           s=s.replaceAll("[^a-zA-Z]","");
           System.out.println(s);
         }
      }
      
      Java language logo

      Remove characters in a string except alphabets

      0

      0

      avatar
      drzyadav

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.