Search code examples
regexyoutube-dl

How can I form REGEX in command line utility of youtube-dl to ignore certain keywords from playlist?


How can I form REGEX in command line utility of youtube-dl to ignore certain keywords from playlist. Moreover, are RegEx same as in BASh and Java?


Solution

  • youtube-dl uses the Python re library, which is substantially compatible to the regular expressions in Java and bash.

    For example, to match only videos with titles containing chicken or noodles in a YouTube search for recipe, you can use

    youtube-dl ytsearch20:recipe --match-title '(chicken|noodles)'