Advertisement
16112

Regex email

Feb 25th, 2019
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.31 KB | None | 0 0
  1. package regex;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class project {
  6.  
  7.     public static void main(String[] args) {
  8.  
  9.         Scanner sc = new Scanner(System.in);
  10.         String text = sc.nextLine();
  11.         String cenzora = text.replaceAll("[A-Za-z_0-9]+@[A-za-z]+\\.[a-zA-Z]+", "***@abv.bg");
  12.         System.out.println(cenzora);
  13.  
  14.     }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement