Hey mates! Can someone help me with an issue? I edit a lot of house music and I need e simple thing but I don't know how to do it. Many artist are like that:
Alex C
Marco V
Alison B
I want to add a dot after last letter to become:
Alex C.
Marco V.
Alison B.
But I want also to do this only with certain letters because some letters should remain the same ( ex: I, U, O, A) so if you show me a script that I can edit myself with desired letters will be perfect!
I would apply a filter first because I fear that you would be surprised to see which artist have a single last letter andn are not part of that list you supplied:
%artist% MATCHES ".* .$"
Then I would devise an action of the type "Replace with regular expression" for just the selected tracks:
ARTIST
Search String: (.* .$)
Replace String: $1.
thanks for your answer!
But I know exactly after what letters should a place a dot, just show me an action that I can edit only my letters that I'm taking about
I Just want to apply the action to all tags, just replace letters like B C D G H T Z, etc (as a single word and if it's possible except first and last word (in this case just my letter!!) of the string!!) with B. C. D. G. H. T. Z. and so on ...
You have not tried the action yet, have you?
It relieves you from createing a separate replace action for each letter and you can apply the action to all the selected files at once.
Now here is a filter that you can append with your letters (I prepared it for D and T):
%artist% MATCHES " (D|T)$"
This filter will show only files that either have a single D or a single T at the end of the artist field. "Mousse T." would not show up then ...
Just add another vertical bar and character before the closing brackets.
If you then sort the artists, you will see which ones still need a dot and which don't (because they prefer to spell their names like that). I still think that getting an overview first and then add the dot is much safer than doing it in a bulk action.
Sorry to revive this and I've done research on working with my tags so I know better to use a filter but I typed in %artist% MATCHES \b[A-Z]{2}.+?\b to search for ALL CAPS words and %artist% MATCHES[A-Z]. to find artists with a capital and then a full stop (which daniel.ok could have used to filter too, right?)
The last string %artist% MATCHES[A-Z]\ indeed finds CAPSperiod eg.X.
%artist% MATCHES \b[A-Z]{2}.+?\b gives me everything!
What I would like is this:
R.O.C.K. In The U.S.A (or any other tag that uses acronyms of more than one CAP and a period, such as M.A.R.R.S) to become
ROCK (R.O.C.K) In The USA (U.S.A) - thus preserving the original feel of the song BUT I can easily search for ROCK in The USA (in my DJ program) by not having to type in all the periods, especially when not all acronyms are identical.
e.g. U.S.A. is NOT the same as U.S.A - sometimes last period is not there
What I have is this
Capitalize the Letter In front of a period. A.B.C.
Field:_Tag
re:(?<=.)([^\W\d_])
$upper($1) (Not my code, also anything that starts with lower case (eg u.s.a) without the period is leaves the first letter (in e.g, U) untouched by this code, so running a CAPITAL after space regex is required first)
Search and replace period with nothing
Field:ARTIST
Search:. (period)
Replace with nothing
*Nice to be able to use regex for this too
3A) Copy the relevant tag to a temp or other artist tag in case it has to be restored
3B) find words that START with more than 1 CAPITAL letter, e.g. USA
\b[A-Z]{2}.+?\b
This last regex code works in regex but not in FILTER
The final bit is to make ROCK into ROCK (R.O.C.K)
I'm lost here.
I did find some code to isolate the CAPSdotCAPSdot words and store in a temp variable so could merge them if I knew what code to use.
As always, i will keep trying
Any help or tips or pointers please? Thanks
PS. Thank you again, when I get a paying job, I'll donate some your way. You're all awesome there. Cheers
Why? Replacing one string constant (here: period) with another (here: nothing) is best achieved with a simple replace as regular expressions are potentially slower and have their real virtue with patterns.
This could be achieved with an action of the type "Case conversion" in which you set the dot/period/full stop as separator indicating a new word start.
Please watch out for artists like t.A.T.u., will.i.am (who also uses Will.I.Am and other vairations), f.u.z.z., k.d. lang, the abbreviation a.k.a
and probably a lot more exceptions.
If you want to remove any dot:
$replace( X.Y.Z.Z.Y,.,) -> XYZZY
To remove only those following a capital letter: $regexp(X.Y.Z.Z.Y x.y.z.y,(\u)\.,$1) -> XYZZY x.y.z.y