Package pt.opensoft.text

Examples of pt.opensoft.text.Regex


  public static void parseDDL (Hashtable tables, Hashtable views, Hashtable types, String ddl) {

        try {

            Regex regex = new Regex("\\sgo\\s|;",Regex.CASE_INSENSITIVE_MASK);

      List commands = regex.split(ddl);

      for (Iterator it = commands.iterator(); it.hasNext(); ) {

                String command = (String) it.next();

        if (debug == 0) System.out.print(".");

        if ((new Regex("create table",Regex.CASE_INSENSITIVE_MASK)).contains(command)) {
          createTable(types, tables, command);
          continue;
        }

        if ((new Regex("create view",Regex.CASE_INSENSITIVE_MASK)).contains(command)) {
          createView(tables, views, command);
          continue;
        }

        if ((new Regex("alter table",Regex.CASE_INSENSITIVE_MASK)).contains(command)) {
          alterTable(tables, command);
          continue;
        }
      }
View Full Code Here


        regex = StringUtil.replace(regex, ".", "\\.");
        regex = StringUtil.replace(regex, "*", ".*");
        regex = StringUtil.replace(regex, "?", ".?");

        _regex = new Regex(regex, Regex.CASE_INSENSITIVE_MASK);
    }
View Full Code Here

    public RegularExpressionFilenameFilter() {
    }

  public RegularExpressionFilenameFilter (String regex) {
    _regex = new Regex(regex);
  }
View Full Code Here

  public RegularExpressionFilenameFilter (String regex) {
    _regex = new Regex(regex);
  }

  public RegularExpressionFilenameFilter (String regex, int mask) {
    _regex = new Regex(regex, mask);
  }
View Full Code Here

TOP

Related Classes of pt.opensoft.text.Regex

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.