Welcome Guest

Pages: 1
Find / replace special characters
rh2021PostMay 30, 2021, 23:02
Newbie
Posts: 6
Registered:
May 3, 2021, 03:41
Normal topicFind / replace special characters

In using the find / replace dialog box (Cmd+f), are there any shortcuts for special characters ?
for example tabs - in some applications you can use \t or ^t to find tabs

I have written an action which re-inserts lines in lyrics. For some unknown reason some (not all) lyrics were reduced to one line with Cr/Lf stripped out. The above find is used to identify tracks with line breaks in the lyrics and this selection can be removed before performing my action.

Thanks in advance

Ralph

Ralph H

2MR2PostMay 31, 2021, 06:58
Avatar photo
Administrator
Posts: 2085
Registered:
August 23, 2012, 19:27
Normal topicFind / replace special characters

I assume that you're using cmd+f in the main window to select appropriate files. cmd+f is mapped to the Filter Editor. The Filter Editor supports standard Yate escape sequences. Right click in a field and select Insert Yate Escape Sequence>Character Sequences. \- is tab, \n is newline. If you need a carriage return you can use \&000D

However, if you're writing an action why not let the action do the work? Place the following snippet at the start of the action.

Expand Execution to Unselected Files
Test if the Lyrics field contains "\n" (Set result and Variable 0)
Ignore files where Variable 0 is true
Exit if false

The first statement effectively selects all loaded files. (One file will have to be selected unless you check the Always column for the action in the Action Manager).

The second statement checks lyrics for the presense of a newline character and saves the per file results to Variable 0.

The third line ignores all files which have a \n in the lyrics.

The fourth line is mandatory and says get out if there are no appropriate files.

From that point on all available files will not have newline sequences in the Lyrics field.

Hopefully this helps.

rh2021PostJune 1, 2021, 23:36
Newbie
Posts: 6
Registered:
May 3, 2021, 03:41
Normal topicFind / replace special characters

Thanks for the reply
It took me a bit to understand that "right click in a field" meant in the field in the filter editor ! - all good.
I've worked my way through all the files (sure gave my NAS drive a bit of work).

Cheers

Ralph H

2MR2PostJune 2, 2021, 08:59
Avatar photo
Administrator
Posts: 2085
Registered:
August 23, 2012, 19:27
Normal topicFind / replace special characters

Glad it worked. In Yate ... when in doubt ... look at a field's context menu 🙂

Pages: 1
Mingle Forum by Cartpauj | Version: 1.1.0beta | Page loaded in: 0.019 seconds.