Peters Flexible RenAmiNg Kit (PFrank) Forum Index Peters Flexible RenAmiNg Kit (PFrank)
Support and Discussion Site for the PFrank File/Folder Renaming Tool (http://www3.telus.net/pfrank)
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

replacing numbers with characters only before "-"

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



Joined: 11 Jun 2011
Posts: 1

PostPosted: Sat Jun 11, 2011 12:19 pm    Post subject: replacing numbers with characters only before "-" Reply with quote

number to replace
1234567890 with ASDFGHJKLO
1 -> A, 2 -> S, 3 -> D, etc

Here is a case:
1. AB1213456-20000.jpg -> AB1213456_ABASADFGH-20000.jpg
the code before "-" will be copied and numbers before "-" will be replaced

is it possible to do such thing?
Back to top
View user's profile Send private message
admin
Site Admin


Joined: 09 Mar 2007
Posts: 446
Location: Canada

PostPosted: Mon Jun 13, 2011 5:04 am    Post subject: Reply with quote

Hi,

Copy the following into the custom renaming creator (do not include the single quotes).

Row: 1
Search: '(.*)1(.*)-(.*)'
Replace: '\1A\2-\3'
Row: 2
Search: '(.*)2(.*)-(.*)'
Replace: '\1S\2-\3'
Row: 3
Search: '(.*)3(.*)-(.*)'
Replace: '\1D\2-\3'


You will have to repeat the pattern if the numbers can appear more than once. Or rerun the scan multiple times. Further modifications would be needed if more than one dash can appear in the name. YOu also have to add the translations for the other digits.

It's not an elegant solution but will do the job.

Hope this helps.

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