Created
July 16, 2011 03:58
-
-
Save 6LYTH3/1085988 to your computer and use it in GitHub Desktop.
ACM_A Tale from the Dark Side of The Moon
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main; | |
import java.io.File; | |
import java.util.Scanner; | |
public class TheMoon { | |
public static void main(String[] args)throws Throwable{ | |
File file = new File("txt"); | |
Scanner sc = new Scanner(file); | |
String str; | |
while(sc.hasNext()){ | |
str = sc.nextLine(); | |
if(str.equals("EOF")) break; | |
System.out.println(str.replaceAll("dd","p").replaceAll("pink", "floy").replaceAll("[0-9]","").replaceAll("[A-Z]","").replaceAll("[@#$%^,&!+=.]","").replaceAll("ei", "ie")); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment