Skip to content
Discussion options

You must be logged in to vote

Hello, my current goal for how files should look is number-track_name, that is, there is an initial number for the year or track, a hyphen as a delimiter, and then the title for the album or track. Is there any way I can perform a replace only on e.g. $title and $album, or is there a regular expression solution?

This is what my replace section currently looks like:

replace:
    '[\\/]': _
    '[\x00-\x1f]': _
    '[<>:\!\?\*\|_]': _
    '-+': _
    '^(\d+)\s+': '\1-'
    '\s+': _
    '[:,]': ''
    '[^a-z0-9_-]': ''

'^(\d+)\s+': '\1-' is supposed to preserve the initial number place a hyphen, but it looks like these hyphens are being replaced with underscores by '-+': _. What could I po…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@keeganjk
Comment options

Comment options

You must be logged in to vote
2 replies
@keeganjk
Comment options

@keeganjk
Comment options

Answer selected by keeganjk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants