How to strip everthing other than a word in line?


i.e "Movie Name : Chameli (2004) Singer : Sunidhi Chauhan Music Director : Sandesh Shandilya"

Is it possible to extract "Sunidhi Chauhan" out of this Line and put it in the "Artist" tag with the parser of mp3tag?

I cannot use FindInLine command as Singer is not always returned by the server. So FindInLine Command error outs. So all i can do is strip out the unwanted data whenever Singer info is returned.

I am trying this command regexpreplace "^[^S]+" "" which removes everthing before "Singer" if the movie name does not start with "S"

How do I modify this regex to strip everything before only if the word is Singer?

What about striping everything on and after "Music Director"?

Please help as I am very close to making the first script that will help anybody looking to tag Indian Music.

any help is much appreciated.


As a starting point:

$regexp(Movie Name : Chameli (2004) Singer : Sunidhi Chauhan Music Director : Sandesh Shandilya,Movie Name : (.+?) Singer : (.+?) Music Director : (.+),$2)

gives 'Sunidhi Chauhan'.



Thx a lot. Got it working. Basically this is what I did if anyone else is interested.

MoveLine -1
MoveLine +1
killtag "*"
regexpreplace "^(\s)" ""
regexpreplace " (.+?)   " ""
regexpreplace "Singer(.+)" "Singer"
regexpreplace "(.+?)Singer" "Singer"
outputto "Artist"
if "Singer"
        MoveLine -1
        MoveLine +1
        killtag "*"
        if " Singer"
            regexpreplace "Singer : " ""
            regexpreplace "(.+?) Singer : " ""
        regexpreplace "   (.+)" ""
        if "  ,"
            MoveChar 4
        Say "|"
        Say "|"

This will output anything in between Singer : and Music Director : if Singer exists.