Created
February 8, 2015 19:04
-
-
Save webstandardcss/f4961d5bbb45b28403fd to your computer and use it in GitHub Desktop.
Regular expression for parsing old ansible variables with the $ and replacing with jinja2 style double curly brace
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Search for: | |
\$\{?(\w+\.?\_?\w+\.?\_?\w+)\}? | |
Replace with | |
{{ \1 }} |
Insanely complete Ansible playbook, showing off all the options.
https://gist.github.com/webstandardcss/9d1a293914d972399712
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks God and Sublime Text for allowing me to interactively construct this regex and save hours of mindless drudgery replacing$this.stuff and $ {that_stuff} with all of {{ this_stuff.here }}. Without your quick feedback this would not have been possible for me to do so quickly.
Oops what about ${ this_there } !