View previous topic :: View next topic |
Author |
Message |
RR
Joined: 11 Mar 2007 Posts: 50 Location: India
|
Posted: Sun Jan 24, 2010 3:26 am Post subject: 01 - Sam 'The Man' Taylor - Oo-Wee |
|
|
which quick route would you take to go about the following renaming instances?
14-Chuck Calhoun & His Atlantic All-Stars_ Hey Tiger.mp3
14 - Chuck Calhoun & His Atlantic All-Stars - Hey Tiger.mp3
16-Sam 'the Man' Taylor_ Oo-Wee.mp3
16 - Sam 'The Man' Taylor - Oo-Wee.mp3
Newton's thread
Removing the first '-' only
http://pfrank.s4.bizhat.com/pfrank-ftopic208.html
almost answered this question. |
|
Back to top |
|
|
admin Site Admin
Joined: 09 Mar 2007 Posts: 448 Location: Canada
|
Posted: Sun Jan 24, 2010 8:16 pm Post subject: |
|
|
The following lines in the customer renaming creator should work (do no copy the single quotes):
Row: 1
Search: '(?1)-'
Replace: ' '
Row: 2
Search: '_'
Replace: ' - '
Row: 3
Search: 'the'
Replace: 'The'
Peter. |
|
Back to top |
|
|
RR
Joined: 11 Mar 2007 Posts: 50 Location: India
|
Posted: Mon Jan 25, 2010 3:13 am Post subject: |
|
|
'(?1)-'
ha! this is it!
this neatly solves the problem. suppose--if i may go further--we'd like to reverse the postions? |
|
Back to top |
|
|
admin Site Admin
Joined: 09 Mar 2007 Posts: 448 Location: Canada
|
Posted: Mon Jan 25, 2010 6:35 am Post subject: |
|
|
To change fields (like the artist and title), you have to use the grouping feature of regular expressions.
Expanding the previous example with row 4:
Row: 1
Search: '(?1)-'
Replace: ' '
Row: 2
Search: '_'
Replace: ' - '
Row: 3
Search: ''the'
Replace: ''The'
Row: 4
Search: '(?E)^(.*?) - (.*)'
Replace: '\2 - \1'
This should switch the artist/title fields from the example names you gave earlier.
Peter. |
|
Back to top |
|
|
|