commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Woonsan Ko <woon...@apache.org>
Subject Re: Commons Lang substitution
Date Tue, 17 Nov 2015 22:19:28 GMT
I think Jörg is right.

You may change the suffix StrMather through
#setVariableSuffixMatcher() on a StrSubstitutor.
I haven't tried it, but it should be something like this example:

final Map<String, V> valueMap = ...;
StrSubstitutor  subst = new StrSubstitutor(valuesMap, "$", ""); //
NONE_MATCHER for suffix initially
subst.setVariableSuffixMatcher(StrMatcher.trimMatcher());

HTH,

Woonsan


On Tue, Nov 17, 2015 at 2:20 PM, Jörg Schaible <joerg.schaible@gmx.de> wrote:
> Alex Soto wrote:
>
>> 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.
>
> Instead of guessing, I'd rather have a look into the Javadocs of
> StrSubstitutor.
>
> Cheers,
> Jörg
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message