jakarta-oro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andres Dominguez Burgos" <And...@landc.be>
Subject substitution
Date Thu, 03 Jul 2003 13:46:00 GMT
Hello.
How do you substitute if you have /b[a]b/ and you want [bbb]?
This does not seem to work:
        String patt = " [.,]";

        Perl5Matcher patternMatcher;
        Perl5Compiler compiler = new Perl5Compiler();
        patternMatcher  = new Perl5Matcher();
        try {
        Perl5Pattern pattern = (Perl5Pattern) compiler.compile(patt);

        Perl5Substitution subs = new Perl5Substitution("[.,]");
        return Util.substitute(patternMatcher,pattern,subs,inputS,Util.SUBSTITUTE_ALL);
        } catch(Exception e){
            e.printStackTrace();
    }
Thanks,
A

---------------------------------------------------------------------
To unsubscribe, e-mail: oro-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: oro-dev-help@jakarta.apache.org


Mime
View raw message