python regex songs -
sorry, need finding right regular expression this. want recognize via regex if following format in string:
artist - title (something)
examples:
"ellie goulding - gracious (the chainsmokers remix)" "the xx - got love (florence , machine cover)" "neneh cherry - (loco dice remix)" "my chemical romance - famous last words (video)" i have been trying haven't been able find right regular expression.
regex = "[a-za-z0-9\s]+[\-]{1}[a-za-z0-9\s]+[\(]{1}[\s]*[a-za-z0-9\s]*[\)]{1}" help please!
i do
regex = r"^[^\-]*-[^\(]*\([^\)]*\)$"
Comments
Post a Comment