Re: Commons Lang substitution

2015-11-18 Thread Alex Soto
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, "$", "");

Re: Commons Lang substitution

2015-11-17 Thread Jörg Schaible
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

Re: Commons Lang substitution

2015-11-17 Thread Alex Soto
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, >

Re: Commons Lang substitution

2015-11-17 Thread Woonsan Ko
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, "$", ""); //

Re: Commons Lang substitution

2015-11-16 Thread Benedikt Ritter
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

Re: Commons Lang substitution

2015-11-16 Thread Jörg Schaible
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