IPB

Welcome Guest ( Log In | Register )

> Notice!

Please take a minute to check our Frequently Asked Questions. Use Search to reveal possible related topics.

Also make sure you've read the Forum Guidelines before posting in this forum.

 
Reply to this topicStart new topic
> Using Actions to remove a new line?
sigrun
post Oct 17 2011, 21:20
Post #1


Member


Group: Full Members
Posts: 25
Joined: 16-October 10
Member No.: 13079
Mp3tag Version: 2.46a



What do I use to represent a newline in an "Action"?

For example:

If I copy and paste the names of a band members into the comments field from a source that included separate lines for each name, how do I use an action to remove those new lines...

If that makes sense.

Thanks!
Go to the top of the page
 
+Quote Post
pone
post Oct 17 2011, 21:32
Post #2


Member


Group: Full Members
Posts: 1692
Joined: 15-March 09
From: Germany
Member No.: 9103
Mp3tag Version: 2.59b



ZITAT(sigrun @ Oct 17 2011, 22:20) *
What do I use to represent a newline in an "Action"?

For example:

If I copy and paste the names of a band members into the comments field from a source that included separate lines for each name, how do I use an action to remove those new lines...

If that makes sense.

Thanks!



Action: Format Value
Field: COMMENT
Formatstring: $regexp(%comment%,\n,; )

This replaces a linebreak with "; ". You can replace this with whatever you want in your new one line comment instead of a line break.
Go to the top of the page
 
+Quote Post
sigrun
post Oct 17 2011, 21:51
Post #3


Member


Group: Full Members
Posts: 25
Joined: 16-October 10
Member No.: 13079
Mp3tag Version: 2.46a



QUOTE (pone @ Oct 17 2011, 21:32) *
Action: Format Value
Field: COMMENT
Formatstring: $regexp(%comment%,\n,; )

This replaces a linebreak with "; ". You can replace this with whatever you want in your new one line comment instead of a line break.


That works, Thanks!!

Go to the top of the page
 
+Quote Post
sigrun
post Oct 21 2011, 20:59
Post #4


Member


Group: Full Members
Posts: 25
Joined: 16-October 10
Member No.: 13079
Mp3tag Version: 2.46a



I am having an issue with this now.

If I apply the action and then move a through the words I notice the cursor still acts like there is something there; where the words had previously been on a new line.

For example I had a line like this:

Hard Rock
Blues Rock

I then used an action to make the line like this:

"Hard Rock" "Blues-Rock"

But when I search iTunes for "Blues-Rock" (with quotation marks) I don't get any results. Where as I do get a result if I search "Blues-Rock (with the first quotation mark), because there is an invisible extra character in between the k and " .

Is their a way to fix this??

thanks!

This post has been edited by sigrun: Oct 21 2011, 21:02
Go to the top of the page
 
+Quote Post
dano
post Oct 21 2011, 22:20
Post #5


Moderator


Group: Moderators
Posts: 5651
Joined: 4-September 03
From: Germany
Member No.: 201
Mp3tag Version: 2.84c



Mp3tag linebreaks are \r\n
You should have used this
$regexp(%comment%,\r\n,; )

Might have to run this
$regexp(%comment%,\r,)
to fix it.


--------------------
Go to the top of the page
 
+Quote Post
DetlevD
post Oct 22 2011, 03:34
Post #6


Member


Group: Full Members
Posts: 6639
Joined: 26-May 06
From: Wuppertal, Germany, Planet Earth
Member No.: 3194
Mp3tag Version: 2.84b



QUOTE (sigrun @ Oct 17 2011, 22:20) *
What do I use to represent a newline in an "Action"? ... how do I use an action to remove those new lines ...

You might want to use ...
Action: Format value
Field: COMMENT
Formatstring: $regexp(%COMMENT%,'[\r\n]+',';')

DD.20111022.0435.CEST

This post has been edited by DetlevD: Oct 22 2011, 03:53


--------------------
* Beyond that, don't ask, when you don't know what to do with the answer. *
♥ home is where the heart is ♥
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 23rd September 2017 - 13:51