#1 : 05/02-16 20:56 lechupe
Posts: 2
|
hi,
at first thanks for great soft. file name pattern: <word1> <word2> <word3> (#12345) rrrr-mm-dd I want to change the position of two last part to get : <word1>....<word3> rrrr-mm-rr (#12345) tried the rename method with the change: (#\d+) (\d\d\d\d-\d\d-\d\d) for \2 \1 but does not to work can I have some suggestions please |
#2 : 06/02-16 01:10 Tester123
Posts: 92
|
Reply to #1:
Your search string needs a little tweak to be: (\(#\d+\)) (\d{4}-\d{2}-\d{2}) Basically you were missing the parentheses. The outer ones in (\(#\d+\)) denotes group 1, and the inner ones are escaped e.g. '\(', so they are treated as literals. The second group is a bit nicer to read when the quantifiers are used as shown above. But otherwise, you almost had it! |
#3 : 06/02-16 15:30 lechupe
Posts: 2
|
Reply to #2:
many thanks for the right advice ! |
#4 : 03/03-16 04:54 Nashaat Akeel
Posts: 1
|
Hi All,
How can I change this file name from 03-Mar-2016 to be 2016-Mar-03 YYYY-MMM-DD Any suggestion Please. |
#5 : 03/03-16 21:20 Tester123
Posts: 92
|
Reply to #4:
Use this Replace Method: Text to be replaced: (\d+)-(\w+)-(\d+) Replace with: \3-\2-\1 Use regular expressions: Tick Summary: Define three groups: the first is a series of digits '(\d+)', the second is a series of letters '(\w+)', and the third is a series of digits '(\d+)'. Then replace with third group '\3', followed by a dash, followed by the second group '\2' and a dash and then finally the first group '\1'. Effectively, this just swaps the first and third groups since group 2 (the month) is unchanged in the middle. |