Package org.apache.oro.text.perl

Examples of org.apache.oro.text.perl.Perl5Util.substitute()


            // ASSUMPTION: JavaScript is indented, WM is not.
            contents = perl.substitute("s/\n}/\n#end/g", contents);
        }
        else
        {
            contents = perl.substitute("s/(\n\\s*)}/$1#end/g", contents);
            contents = perl.substitute("s/#end\\s*\n\\s*#else/#else/g",
                                       contents);
        }

        return contents;
View Full Code Here


            contents = perl.substitute("s/\n}/\n#end/g", contents);
        }
        else
        {
            contents = perl.substitute("s/(\n\\s*)}/$1#end/g", contents);
            contents = perl.substitute("s/#end\\s*\n\\s*#else/#else/g",
                                       contents);
        }

        return contents;
    }
View Full Code Here

        Enumeration packages = packageManager.getPackageTypes();
        while ( packages.hasMoreElements() )
        {
            PackageType pkg = (PackageType) packages.nextElement();
            String pkgName = pkg.getName();
            String pkgDir = perl.substitute( "s/\\./\\//g", pkgName );
            String rootRef = perl.substitute( "s/[^\\.]*(\\.|$)/..\\//g", pkgName );

            // special case for the default package
            // javadoc doesn't deal with it, but it's easy for us
            if ( pkgName.length() == 0 )
View Full Code Here

        while ( packages.hasMoreElements() )
        {
            PackageType pkg = (PackageType) packages.nextElement();
            String pkgName = pkg.getName();
            String pkgDir = perl.substitute( "s/\\./\\//g", pkgName );
            String rootRef = perl.substitute( "s/[^\\.]*(\\.|$)/..\\//g", pkgName );

            // special case for the default package
            // javadoc doesn't deal with it, but it's easy for us
            if ( pkgName.length() == 0 )
            {
View Full Code Here

            else
            {
              // Specific search field specified, add the field specific field.

              // Replace single quotes with double quotes (only if they match)
              String subQuery = util.substitute("s/\'(.*)\'/\"$1\"/g", field.getQuery());

              // If the field is not quoted ...
              if (!util.match("/\".*\"/", subQuery))
                {
                // ... then separate each word and re-specify the search field.
View Full Code Here

              // If the field is not quoted ...
              if (!util.match("/\".*\"/", subQuery))
                {
                // ... then separate each word and re-specify the search field.
                    subQuery = util.substitute("s/[ ]+/ " + field.getField() + ":/g", subQuery);
                }

              // Put the subQuery into the general query
              query.append("(").append(field.getField()).append(":").append(subQuery).append(")");
            }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.