Peters Flexible RenAmiNg Kit (PFrank) Forum Index Peters Flexible RenAmiNg Kit (PFrank)
Support and Discussion Site for the PFrank File/Folder Renaming Tool (***NEW HOME PAGE*** "http://pfrank.atwebpages.com")
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

01 - Sam 'The Man' Taylor - Oo-Wee

 
Post new topic   Reply to topic    Peters Flexible RenAmiNg Kit (PFrank) Forum Index -> Regular Expressions
View previous topic :: View next topic  
Author Message
RR



Joined: 11 Mar 2007
Posts: 50
Location: India

PostPosted: Sun Jan 24, 2010 3:26 am    Post subject: 01 - Sam 'The Man' Taylor - Oo-Wee Reply with quote

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
View user's profile Send private message
admin
Site Admin


Joined: 09 Mar 2007
Posts: 448
Location: Canada

PostPosted: Sun Jan 24, 2010 8:16 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
RR



Joined: 11 Mar 2007
Posts: 50
Location: India

PostPosted: Mon Jan 25, 2010 3:13 am    Post subject: Reply with quote

'(?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
View user's profile Send private message
admin
Site Admin


Joined: 09 Mar 2007
Posts: 448
Location: Canada

PostPosted: Mon Jan 25, 2010 6:35 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Peters Flexible RenAmiNg Kit (PFrank) Forum Index -> Regular Expressions All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group. Hosted by phpBB.BizHat.com


Start Your Own Video Sharing Site

Free Web Hosting | Free Forum Hosting | FlashWebHost.com | Image Hosting | Photo Gallery | FreeMarriage.com

Powered by PhpBBweb.com, setup your forum now!
For Support, visit Forums.BizHat.com