This is a valid concern. Thanks for pointing it out. I will update the article.
I see you only updated the regex in one of the playbook tasks in your article. The issue I pointed out apply to all of the tasks, however, and also for "regexp", as well as "insertafter/before" parameters.