Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorafinkbein2008-03-26 18:11:02 +0000
committerafinkbein2008-03-26 18:11:02 +0000
commita90544c1c4c59165e7c96b369e3b8a20d8c490e7 (patch)
treecaaf0b009ab8ccbda2b786ac532ed0f6f33409e9
parentf7952f1f34e3777e9279677353ba7552391b96cb (diff)
downloadorg.eclipse.osee-a90544c1c4c59165e7c96b369e3b8a20d8c490e7.tar.gz
org.eclipse.osee-a90544c1c4c59165e7c96b369e3b8a20d8c490e7.tar.xz
org.eclipse.osee-a90544c1c4c59165e7c96b369e3b8a20d8c490e7.zip
-rw-r--r--org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/word/WordUtil.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/word/WordUtil.java b/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/word/WordUtil.java
index 6619e2af89b..c79f9073096 100644
--- a/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/word/WordUtil.java
+++ b/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/word/WordUtil.java
@@ -14,6 +14,7 @@ package org.eclipse.osee.framework.skynet.core.word;
import static org.eclipse.osee.framework.ui.plugin.util.db.schemas.SkynetDatabase.ATTRIBUTE_VERSION_TABLE;
import static org.eclipse.osee.framework.ui.plugin.util.db.schemas.SkynetDatabase.TRANSACTIONS_TABLE;
import static org.eclipse.osee.framework.ui.plugin.util.db.schemas.SkynetDatabase.TRANSACTION_DETAIL_TABLE;
+
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
@@ -28,6 +29,7 @@ import java.util.List;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
+
import org.eclipse.osee.framework.jdk.core.text.change.ChangeSet;
import org.eclipse.osee.framework.jdk.core.type.Pair;
import org.eclipse.osee.framework.jdk.core.util.GUID;
@@ -226,4 +228,21 @@ public class WordUtil {
}
return guid;
}
+
+ private static final Matcher spellCheck = Pattern.compile("<w:proofErr w:type=\"spell(End|Start)\"/>", Pattern.DOTALL | Pattern.MULTILINE).matcher("");
+ public final static String stripSpellCheck(String content){
+ spellCheck.reset(content);
+ return spellCheck.replaceAll("");
+ }
+
+ public static void main(String[] args){
+ String match = "do something <w:proofErr w:type=\"spellEnd\"/> some more stuff <w:proofErr w:type=\"spellStart\"/> now some more stuff";
+
+ String result = WordUtil.stripSpellCheck(match);
+
+ if("do something some more stuff now some more stuff".equals(result)){
+ System.out.println("success");
+ }
+
+ }
}

Back to the top