commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Soto <asot...@gmail.com>
Subject Re: Commons Lang substitution
Date Tue, 17 Nov 2015 08:26:15 GMT
Hi, thank you for your answers, Jörg I think that StrMatcher is for
implementing where you want to get information to be replaced on the
string, not for parsing issues.

El dl., 16 nov. 2015 a les 21:38, Jörg Schaible (<joerg.schaible@gmx.de>)
va escriure:

> Benedikt Ritter wrote:
>
> > Hello,
> >
> > 2015-11-14 22:25 GMT+01:00 Anthony Brice <anthonybrice@lateachiever.com
> >:
> >
> >> I could be wrong, but I do believe StrSubstitor requires a prefix and
> >> suffix. I don't think the class will replace variables that aren't in
> the
> >> map either, unless you write a custom StrLookup that returns an empty
> >> string for variables not previously defined.
> >>
> >
> > Yes, this is correct. The replace with blank could be implemented using a
> > custom StrLookup. However, it is not possible to configure a
> > StrSubstitutor to use only a starting character.
>
> End "character" could be any non-alphanum character. Isn't it what the
> StrMatcher could be used for?
>
> Cheers,
> Jörg
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message