How to Delete Duplicate Tags?
Posted: Fri Jan 04, 2013 11:13 am
Hi,
I have the following text I am trying to massage where I want to remove the duplicate tags, but of course keep the first occurrence.
Here is an example of the starting text:
TTITLE01=Burning Love
TTITLE02=Way Down
TTITLE03=A Little Less Conversation (JXL Radio Edit Remix) (Bonus Trac
TTITLE03=k)
EXTD=ELVIS PRESLEY - ELV1S 30 #1 Hits\n\n(2002)\n\n-- liner notes --\n
EXTD=\n(front cover)\n\nThe front cover consists entirely of a gold-to
EXTD=ne background with the word "ELV1S" \nspanning roughly 80 percent
EXTD= of the width of the cover, centered horizontally and \nverticall
EXTD=y on the page.
EXTT0=1. Heartbreak Hotel (2:10)\n\n(Written by Axton/Durden/Presley
EXTT0=)\nPublished by Sony/ATV Songs LLC dba Tree Publishing Co. (BMI)
EXTT0=\nVocals: Gordon Stoker, Ben Speer and Brock Speer\nRecorded Jan
EXTT0=uary 10, 1956\nU.S.
EXTT1=2. Don't Be Cruel (2:04)\n\n(Written by Blackwell/Presley)\nPu
EXTT1=blished by Elvis Presley Music administered by Cherry River Musi
EXTT1=c Co. (BMI)/\nElvis Presley Music administered by Chrysalis Song
EXTT1=s (BMI)\nWith The Jordanaires\nRecorded July 2, 1956\nU.S.
EXTT2=3. Hound Dog (2:16)\n\n(Written by Leiber/Stoller)\nPublished
EXTT2=by Universal-MCA Music Publishing (ASCAP)/\nGladys Music adminis
EXTT2=tered by Chrysalis Music (ASCAP)/\nGladys Music administered by
EXTT2=Cherry Lane Music Publishing Company, Inc. (ASCAP)\nWith The Jor
EXTT2=danaires\nRecorded July 2, 1956\nU.S.
And I want the text below but when I try and use the wildcards/perl expression they are too "greedy" and end up removing all the tags after the first one. Any ideas?
Thanks
Lewis
TTITLE01=Burning Love
TTITLE02=Way Down
TTITLE03=A Little Less Conversation (JXL Radio Edit Remix) (Bonus Track)
EXTD=ELVIS PRESLEY - ELV1S 30 #1 Hits\n\n(2002)\n\n-- liner notes --\n\n(front cover)\n\nThe front cover consists entirely of a gold-tone background with the word "ELV1S" \nspanning roughly 80 percent of the width of the cover, centered horizontally and \nvertically on the page.
EXTT0=1. Heartbreak Hotel (2:10)\n\n(Written by Axton/Durden/Presley)\nPublished by Sony/ATV Songs LLC dba Tree Publishing Co. (BMI)\nVocals: Gordon Stoker, Ben Speer and Brock Speer\nRecorded January 10, 1956\nU.S.2. Don't Be Cruel (2:04)\n\n(Written by Blackwell/Presley)\nPublished by Elvis Presley Music administered by Cherry River Music Co. (BMI)/\nElvis Presley Music administered by Chrysalis Songs (BMI)\nWith The Jordanaires\nRecorded July 2, 1956\nU.S.
EXTT2=3. Hound Dog (2:16)\n\n(Written by Leiber/Stoller)\nPublished by Universal-MCA Music Publishing (ASCAP)/\nGladys Music administered by Chrysalis Music (ASCAP)/\nGladys Music administered by Cherry Lane Music Publishing Company, Inc. (ASCAP)\nWith The Jordanaires\nRecorded July 2, 1956\nU.S.
I have the following text I am trying to massage where I want to remove the duplicate tags, but of course keep the first occurrence.
Here is an example of the starting text:
TTITLE01=Burning Love
TTITLE02=Way Down
TTITLE03=A Little Less Conversation (JXL Radio Edit Remix) (Bonus Trac
TTITLE03=k)
EXTD=ELVIS PRESLEY - ELV1S 30 #1 Hits\n\n(2002)\n\n-- liner notes --\n
EXTD=\n(front cover)\n\nThe front cover consists entirely of a gold-to
EXTD=ne background with the word "ELV1S" \nspanning roughly 80 percent
EXTD= of the width of the cover, centered horizontally and \nverticall
EXTD=y on the page.
EXTT0=1. Heartbreak Hotel (2:10)\n\n(Written by Axton/Durden/Presley
EXTT0=)\nPublished by Sony/ATV Songs LLC dba Tree Publishing Co. (BMI)
EXTT0=\nVocals: Gordon Stoker, Ben Speer and Brock Speer\nRecorded Jan
EXTT0=uary 10, 1956\nU.S.
EXTT1=2. Don't Be Cruel (2:04)\n\n(Written by Blackwell/Presley)\nPu
EXTT1=blished by Elvis Presley Music administered by Cherry River Musi
EXTT1=c Co. (BMI)/\nElvis Presley Music administered by Chrysalis Song
EXTT1=s (BMI)\nWith The Jordanaires\nRecorded July 2, 1956\nU.S.
EXTT2=3. Hound Dog (2:16)\n\n(Written by Leiber/Stoller)\nPublished
EXTT2=by Universal-MCA Music Publishing (ASCAP)/\nGladys Music adminis
EXTT2=tered by Chrysalis Music (ASCAP)/\nGladys Music administered by
EXTT2=Cherry Lane Music Publishing Company, Inc. (ASCAP)\nWith The Jor
EXTT2=danaires\nRecorded July 2, 1956\nU.S.
And I want the text below but when I try and use the wildcards/perl expression they are too "greedy" and end up removing all the tags after the first one. Any ideas?
Thanks
Lewis
TTITLE01=Burning Love
TTITLE02=Way Down
TTITLE03=A Little Less Conversation (JXL Radio Edit Remix) (Bonus Track)
EXTD=ELVIS PRESLEY - ELV1S 30 #1 Hits\n\n(2002)\n\n-- liner notes --\n\n(front cover)\n\nThe front cover consists entirely of a gold-tone background with the word "ELV1S" \nspanning roughly 80 percent of the width of the cover, centered horizontally and \nvertically on the page.
EXTT0=1. Heartbreak Hotel (2:10)\n\n(Written by Axton/Durden/Presley)\nPublished by Sony/ATV Songs LLC dba Tree Publishing Co. (BMI)\nVocals: Gordon Stoker, Ben Speer and Brock Speer\nRecorded January 10, 1956\nU.S.2. Don't Be Cruel (2:04)\n\n(Written by Blackwell/Presley)\nPublished by Elvis Presley Music administered by Cherry River Music Co. (BMI)/\nElvis Presley Music administered by Chrysalis Songs (BMI)\nWith The Jordanaires\nRecorded July 2, 1956\nU.S.
EXTT2=3. Hound Dog (2:16)\n\n(Written by Leiber/Stoller)\nPublished by Universal-MCA Music Publishing (ASCAP)/\nGladys Music administered by Chrysalis Music (ASCAP)/\nGladys Music administered by Cherry Lane Music Publishing Company, Inc. (ASCAP)\nWith The Jordanaires\nRecorded July 2, 1956\nU.S.