package org.ferris.riviera.console.script;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 *
 * @author Michael Remijan mjremijan@yahoo.com @mjremijan
 */
public class ScriptPattern {

    protected Pattern pattern;

    public ScriptPattern() {
        String dirRegex
            = "((\\d+.{1}\\d+.{1}\\d+)(\\s*-\\s*(.+))?)";
        String fileRegex
            = "((\\d+.{1}\\d+.{1}\\d+.{1}\\d+)(\\s*-\\s*(.+))?\\.sql)";
        pattern = Pattern.compile(dirRegex + "/" + fileRegex);
    }

    public Matcher matcher(CharSequence input) {
        Matcher m = pattern.matcher(input);
        m.matches();
        return m;
    }
}

@@ -305,32 +305,33 @@
  = %22
+%5E
 ((%5C%5Cd+
-.%7B1%7D%5C%5Cd+.%7B1%7D
+%5C%5C.%5C%5Cd+%5C%5C.
 %5C%5Cd+)(
+?:
 %5C%5Cs*
@@ -336,18 +336,24 @@
 s*-%5C%5Cs*(
-.+
+%5C%5CS%7B1%7D.*
 ))?)%22;%0A 
@@ -401,34 +401,33 @@
 %5C%5Cd+
-.%7B1%7D%5C%5Cd+.%7B1%7D%5C%5Cd+.%7B1%7D
+%5C%5C.%5C%5Cd+%5C%5C.%5C%5Cd+%5C%5C.
 %5C%5Cd+)(
+?:
 %5C%5Cs*
@@ -436,23 +436,29 @@
 %5Cs*(
-.+
+%5C%5CS%7B1%7D.*
 ))?
-%5C%5C
 .sql)
+$
 %22;%0A
+%0A
     
@@ -499,16 +499,18 @@
 egex + %22
+%5C%5C
 /%22 + fil

Update ScriptPattern.java