On your examples, one mixes an specialized language into a general one. The general language is much better for most tasks, but once in a while there is a problem that fits the specialized one. But YAML isn't much better than a general language for defining data structures (what config files are), and isn't general in any way.
- Python provides a grammar for its implementation of regex (note that some langauges make regexes first-class syntax - perl, JS)
- JS has a defined standard cross-platform cross-browser syntax, ditto CSS (yes i know it's not 100% true)
- sed/awk in bash - i agree - but there's a bigger POSIX standard which defines all of it
the problem with yaml is that it isn't even a language, it's just a way to describe a recursive tree/list data structure. everybody defines their own language pretending to standardize on yaml where in fact the syntax similarities are doing little more than mislead you what product you're creating documents for.
Regular expressions and SQL in my Python
JavaScript and CSS in my HTML
Sed / Awk / etc in my Bash
Embedding a custom conditional syntax in YAML feels pretty tame in comparison to those.