mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
Allow additional characters in the default value
This commit is contained in:
parent
2352521dfa
commit
8b6a348ed9
@ -217,7 +217,7 @@ public class NBEnvironment {
|
|||||||
* @return The interpolated value, after substitutions, or null if any lookup failed
|
* @return The interpolated value, after substitutions, or null if any lookup failed
|
||||||
*/
|
*/
|
||||||
public Optional<String> interpolate(String word, Map<String,String> supplemental) {
|
public Optional<String> interpolate(String word, Map<String,String> supplemental) {
|
||||||
Pattern envpattern = Pattern.compile("\\$(?<env1>[a-zA-Z_][A-Za-z0-9_.]+)|\\$\\{(?<env2>[a-zA-Z_][A-Za-z0-9_.]*)(:(?<default>[a-zA-Z0-9_.]+))?\\}");
|
Pattern envpattern = Pattern.compile("\\$(?<env1>[a-zA-Z_][A-Za-z0-9_.]+)|\\$\\{(?<env2>[a-zA-Z_][A-Za-z0-9_.]*)(:(?<default>[a-zA-Z0-9_./\\- ]+))?\\}");
|
||||||
Matcher matcher = envpattern.matcher(word);
|
Matcher matcher = envpattern.matcher(word);
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
while (matcher.find()) {
|
while (matcher.find()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user