Regular Expressions 101

Community Patterns

Find ytdlp downloaded file path

0

Regular Expression
Python

r"
(?:(?# Pattern before filename )(?:\[download\] )?Destination: (?# )|(?# )\[download\] (?# )|(?# )Adding metadata to \"(?# ))(?# )((?# CAPTURE GROUP: filename pattern )\/?[^\/\\\n]+(?:\/|\\)(?# Capture first folder )(?:(?# )[^\n\.]*(?# Stop capturing if point, to check )(?!\.f\d{1,4}\.(?:webm|mov|mp4))(?# Checking this is not a partial download )\.(?# Can now capture the point ))+(?# )(?:webm|mov|mp4)(?# ))(?# )\n?
"
gm

Description

For internal use

Submitted by ezalos - a year ago (Last modified a year ago)