When I tried reproducing this with your posted configuration, I got a similar error but on a different line:
Exiting: error loading config file: yaml: line 15: found unknown escape character
To fix that I used single quotes ' for quoting the regular expressions on line 15 and 17. After I did that, I was able to start up Filebeat without any YAML validation errors.
Your error messages mentions line 20 but the posted configuration does not have 20 lines in it.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.