I have the following code:
userInput = "develop-feature-21"
entry = "develop-feature-**"
entry = entry.replace("**", ".*");
println (userInput ==~ "$entry") // ------> false
I basically want to replace ** and add in a valid regular express .* to find all entries of develop-feature, but the problem I am having is evaluating a RegEx expression within a string.
$entry becomes develop-feature-.*, but how do I tell groovy to then evalulate .*?