#1 : 24/03-16 13:09 Bernie2504
Posts: 17
|
Hi
i need help how can i change the order of an author's name at the beginnig of a filename: e.g.: Joanne K. Rowling - Harry Potter - Complete - 2016 to: Rowling, Joanne K. - Harry Potter - Complete - 2016 the word pattern method <Word:1> <Word:2> <Word:3> <Word:3>, <Word:1> <Word:2> does not work thx for a help regards Bernd |
#2 : 27/03-16 00:12 Tester123
Posts: 92
|
Reply to #1:
Try this Replace Method: Text to be replaced: ([^-]+) ([^-]+)( - )(.+) Replace with: \2, \1\3\4 Use regular expressions: Tick |
#3 : 28/03-16 13:48 Bernie2504
Posts: 17
|
Reply to #2:
BIG Thx for the help - that works pretty good :-) Regards B. |
#4 : 28/03-16 13:52 Murilo Rodrigues
Posts: 6
|
Reply to #2: Very very util
|
#5 : 25/05-16 14:31 Samirah
Posts: 3
|
What about books with authors with hyphenated names?
Or books with multiple authors? For example: J.D. Robb; Mary Blayney; Elaine Fox; Mary Kay McComas; R.C. Ryan I've been swapping the first one with your code but have been having to manually reverse the others using individual Replace commands just manually flipping each one Is there maybe a code that I can just use more than once? (1st instance, 2nd instance, etc) instead of one big long code? |
#6 : 16/06-16 08:23 G. Lambany
Posts: 187
|
Reply to #5:
what about this: text to be replaced: ([^\s]+)\s([^;]+)[;\s]? replace with (note the space at the end): $2, $1; and then add another method in AE to remove last 2 characters... should work for any number of authors. Note that first name is assumed it has no space in it.. so it might be wrong in splitting first name/last name, but that can't really be fixed, unless you had another delimiter cheers! |