Catch the last word character and replace it


#1

Hello to every one

Now I think this is difficult question I try to find out but no luck

i would like if the last word character is “s ” (s with space) to replace it with another character

i am going to replace it with a Greek letter “ς”
I think is every think possible with this program

Thanks Panos


#2

This might help:

Action #1:
Action type: Replace
Field: _ALL
Original: s
Replace with: ς

[ ] only as whole word

[x] case-sensitive comparison

Edit: Make sure you enter "s " in "Original" - the forum didn't include the trailing blank I entered.


#3

Make a new action via Option/Actions:
Select action type: Format value

In Field-Type: TITLE
Format string: $if($eql($right(%title%,2),s ),$left(%title%,$sub($len(%title%),2))\ς,%title%)

Now it should replace it the 's ' with 'ς' and your songs should be fine. But be aware that when you run the script on all your mp3s/wmas other whatever all the last 's ' will be removed by the sigmaf (that's the name of the letter, or???). So better run it only on the songs you want to.

When it is something other than the title, then simply replace title in every case by the field you wanted to edit.

I also added the action so you can simply download it and place it in the Applications Data folder of Mp3tag.
To get there: Look in the options unter export and copy the folderpath you can see there. Then open the explorer and type in the adress list. Then remove \export by \data\actions and there you simply put the action in.

Rename.zip (205 Bytes)


#4

Maybe I didn't get you right, but do you want the last "s " of the whole field to be replaced or the last "s " of each word? So, A or B:

A: "Hellos Worldus Maximus " --> "Helloς Worlduς Maximuς"
B: "Hellos Worldus Maximus " --> "Hellos Worldus Maximuς"


#5

My Grand father use to say:
Working in the night, the next day laughing

Sorry about my first letter wasn’t clear
So this is my example and I m going to replace with “w” be easier to you.
the LAST character ONLY if fount “s” replace with “w”

A: Someones spends lots
B: Someonew spentw lotw

thanks again for helping me


#6

OK, use my action then (and don't forget to use "s " in Original and not "s"). In order to replace the very last "s" (since it isn't followed by a space), use:

Action #1:
Action type: Replace with regular expression
Field: _ALL
Regular expression: s$
Replace matches with: ς

[x] case-sensitive comparison

#7

SquallLeonhart38 wrote:

Now it should replace it the 's ' with 'ς' and your songs should be fine. But be aware that when you run the script on all your mp3s/wmas other whatever all the last 's ' will be removed by the sigmas (that's the name of the letter, or???). So better run it only on the songs you want to

A:
Yes is what I want because all of the words that ending with “s” we writing with “ς” and if there is a sigma in between we writing with “σ”. Thanks again

I have to say thanks for both of you, was nice job

Last night I was dreaming about mp3tag and….
I going to baptize my new action “Greeklish to Greek” so now you understand this is a just converter
(Converts from Latin characters to Greek proper character, From example “eureka” to “ευρικα”. )
And I am writing here to this forum maybe some one that use this program is interesting to know about. When I will finish this project I will upload in this forum.
Some Greek people they know there are some Greeklish txt converters but there are just a simple ones and I like this project to teach it some more Greek grammar so can convert to the limit. Of cause I know will be difficult because there are so many compilation in Greek grammar but I can try.

Now because in this action will be many replacement and I would like to have the shortest way so when convert an album to be quickly. I like to teach me one more thing. My example this time will be clearer than the fist time 

I would like a word that STARTS with “k” or “t” or “ch” or “m” the previous word letter to be “n” even if it does not exist in the previous word, but if “n” exist just keep it

A: The cake is sweet there are challenging
B: The cake is sweetn there aren challenging

A: then table is missing
B: then table isn missing


#8

I am really tired and therefore cannot guarantee that this works:

Action #1:
Action type: Replace with regular expression
Field: _ALL
Regular expression: ([^n]) (k|t|ch|m)
Replace matches with: $1n $2

[x] case-sensitive comparison

#9

OK it's been years but I understand that you (and anyone who might be interested) want to translate greeklish to greek so I suggest to translate all characters to greek as usual and then use this Sigma Zeichen ersetzen for the special case of the letter Σ in the end.