JAL-1807 Bob's first commit -- Applet loaded; needs image
[jalview.git] / src / jalview / analysis / ParseProperties.java
index 3347800..5fe7adb 100644 (file)
  */
 package jalview.analysis;
 
-import com.stevesoft.pat.Regex;
+//import com.stevesoft.pat.Regex;
 
 import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.AlignmentI;
 import jalview.datamodel.SequenceI;
+import jalview.jsdev.RegExp;
+import jalview.jsdev.api.RegExpInterface;
 
 public class ParseProperties
 {
@@ -80,7 +82,7 @@ public class ParseProperties
    *          description for each numeric field in regex match
    * @param regex
    *          Regular Expression string for passing to
-   *          <code>new com.stevesoft.patt.Regex(regex)</code>
+   *          <code>new jalview.jsdevt.Regex(regex)</code>
    * @param repeat
    *          true means the regex will be applied multiple times along the
    *          description string of each sequence
@@ -91,7 +93,7 @@ public class ParseProperties
           boolean repeat)
   {
     int count = 0;
-    Regex pattern = new Regex(regex);
+    RegExpInterface pattern = RegExp.newRegex(regex);
     if (pattern.numSubs() > ScoreNames.length)
     {
       // Check that we have enough labels and descriptions for any parsed
@@ -131,7 +133,7 @@ public class ParseProperties
         pos = pattern.matchedTo();
         for (int cols = 0; cols < pattern.numSubs(); cols++)
         {
-          String sstring = pattern.stringMatched(cols + 1);
+          String sstring = pattern.stringMatchedI(cols + 1);
           double score = Double.NaN;
           try
           {