juneau-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shalitha Suranga <shalithasura...@gmail.com>
Subject Adding PatternReplaceVar to svl core
Date Thu, 08 Nov 2018 08:26:49 GMT

If developer needs to replace some characters or erase some characters from
a variable
 is hard with current variables I think.

How about adding PatternReplaceVar ? I have my test work here

Here are several examples

VarResolver.DEFAULT.resolve("$PR{apple, ^a, A}"); // simply return Apple

VarResolver.DEFAULT.resolve("Java version=$PR{$S{java.version},
(_([0-9]+)), \\ build=\\$2}");

// return Java version=1.8.0 build=191 using back reference

Can we introduce this feature. your ideas?

Notice - unit cases and javadoc is not added for this test work


*Shalitha Suranga*

View raw message