i would convert all the lines here @cat\n@chicken\napple\nfruit\njuice into + : @cat : all\n+ :@chicken: all\n+ :apple : all\n+ : fruit : all\njuice : all in other hand i would get this for every line + : value : all
i would use regex_replace filter to perform the task, i don't have too much knowledge on python, i am trying to do this:
{{ '@cat\n@chicken\napple\nfruit\njuice'| regex_replace('^(?P<name>)$', '\\g<name>: ALL' , multiline=True, ignorecase=True)}} but nothing happens, i am missing something here
^(?P<name>)$is a pattern that only matches an empty string.regex_replace(r'.+', r'+ : \g<0> : all' )regex_replace('.+', '+ : \\g<0> : all' )?