Thanks for your help but sadly doesn't work as expected. Look:
Map map = new HashMap();
map.put("version", "1");
StrSubstitutor strSubstitutor = new StrSubstitutor(map, "$", "");
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
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 ()
va escriure:
> Benedikt Ritter wrote:
>
> > Hello,
>
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 valueMap = ...;
StrSubstitutor subst = new StrSubstitutor(valuesMap, "$", ""); //
Hello,
2015-11-14 22:25 GMT+01:00 Anthony Brice :
> 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
Benedikt Ritter wrote:
> Hello,
>
> 2015-11-14 22:25 GMT+01:00 Anthony Brice :
>
>> 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