Fixed whitespace bug

This commit is contained in:
2022-02-17 21:34:17 +00:00
parent 85152defe3
commit 7791f4f5ba

View File

@@ -1,7 +1,7 @@
//CipherStreamJava/src/main/java/com/mattrixwv/CipherStreamJava/Vigenere.java //CipherStreamJava/src/main/java/com/mattrixwv/CipherStreamJava/monoSubstitution/Vigenere.java
//Matthew Ellison //Matthew Ellison
// Created: 07-25-21 // Created: 07-25-21
//Modified: 01-16-22 //Modified: 02-17-22
package com.mattrixwv.CipherStreamJava.monoSubstitution; package com.mattrixwv.CipherStreamJava.monoSubstitution;
@@ -41,7 +41,7 @@ public class Vigenere{
inputString = inputString.toLowerCase(); inputString = inputString.toLowerCase();
} }
if(!preserveWhitespace){ if(!preserveWhitespace){
inputString = inputString.replaceAll("\\s+", ""); inputString = inputString.replaceAll("\\s", "");
} }
if(!preserveSymbols){ if(!preserveSymbols){
inputString = inputString.replaceAll("[^a-zA-Z\\s]", ""); inputString = inputString.replaceAll("[^a-zA-Z\\s]", "");