Groovy web console

subscribe to the feed Subscribe
to this
site
test-groovy (via #groovywebconsole)
tweet this snippet Tweet
this
script

test-groovy

Published 5 months ago by yb with tags groovy-regex
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
def text = "                   \"image\": \"registry.sicpa-ch7.dev/ptf/kafka-manager:latest\","

println text

println text.replaceAll(~/registry\.sicpa-ch7\.dev/, '\\$\\{DOCKER_REGISTRY_URL\\}')
println text.replaceAll(~/\$\{DOCKER_REGISTRY\}registry\.sicpa-ch7\.dev|registry\.sicpa-ch7\.dev/, '\\$\\{DOCKER_REGISTRY_URL\\}')