Problem with regex


#1

hi,

Some of my .wma files have Tags like this :

albumname[version]\version

I want to remove the last part beginning with the backslash, the problem is, that not all files have this format...

I`ve got this action :

field:
album

regex :
(.+?)[(.+?)]\\(.+?)

replace:
$1[$2]

but it does not work :frowning:


#2

You could use something like this:

Action #1:
Action type: Replace with regular expression
Field: ALBUM
Regular expression: \\.*$
Replace matches with:

[ ] case-sensitive comparison

#3

hmmm that expressions replaces all tags that include a backslash, some tags are like this : blabla/tatata/sdfsdf

they would be replaced too....


#4

Change your expression to ^(.+?)[(.+?)]\\(.+?)$