I'm trying to modify a config file with Ansible, but as brackets are considered as regex element, they don't seem to be taken into account.
But if I try to escape them, I have a syntax error… How is it supposed to work?
# does nothing
regexp: "# unicorn['worker_processes'] = 2"
# error
regexp: "# unicorn\['worker_processes'\] = 2"
# error
regexp: '# unicorn\[\'worker_processes\'\] = 2'