diff options
Diffstat (limited to 'bladictionary.java')
-rw-r--r-- | bladictionary.java | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/bladictionary.java b/bladictionary.java index b2e64da..b68d907 100644 --- a/bladictionary.java +++ b/bladictionary.java @@ -108,9 +108,7 @@ public class bladictionary { if(Character.isLetter(line.charAt(0))) { - - parts = line.split("\\["); - result = result + parts[0] + " "; + result = result+line+" "; } else { @@ -123,6 +121,8 @@ public class bladictionary { { //Delete bits in <>s, don't need this line = line.replaceAll("<.*?> ",""); + + line = line.replaceAll(" \\/.*?\\/ ",""); //Get rid of {}s around words line = line.replaceAll("\\{",""); line = line.replaceAll("\\}",""); @@ -141,7 +141,7 @@ public class bladictionary { else { definition2 = false; - result = result + parts[0]; + result = result + parts[0] + " "; } } else @@ -158,6 +158,13 @@ public class bladictionary { if(!result.equals("")) { + result = result.replaceAll("\\(.*?[;\\)] ?",""); + result = result.replaceAll("\\{.*?[;\\}] ?",""); + result = result.replaceAll("\\[.*?[;\\]] ?",""); + result = result.replaceAll("\\/.*?[;\\/] ?",""); + + result = result.split("\\[")[0]; + result = result.trim()+";"; System.out.println(result); System.exit(0); |