- Posts: 3
- Thank you received: 0
Regex
- phenickx
- Topic Author
- Offline
- New Member
Less
More
2 years 1 week ago #825
by phenickx
Regex was created by phenickx
Hi, newbie here. I have been trying to change the regex expression used by LP3 so it will highlight keys which I have added to the song title. They are enclosed by square brackets. I have tried the syntax on regex101.com and it tells me it's correct. However, in LP3 it does not seem to have any effect. Will it now only work for newly added songs?
Any help very much appreciated. Thanks.
Any help very much appreciated. Thanks.
Please Log in or Create an account to join the conversation.
- dneilsen
- Offline
- Administrator
Less
More
- Posts: 36
- Thank you received: 0
2 years 1 week ago #826
by dneilsen
Replied by dneilsen on topic Regex
Hi Phenickx
The regex expression for highlighting both chords and for highlighting special words are both run every time the file is opened.
Can you give me an example of the regex expression you are trying to use?
The regex expression for highlighting both chords and for highlighting special words are both run every time the file is opened.
Can you give me an example of the regex expression you are trying to use?
Please Log in or Create an account to join the conversation.
- phenickx
- Topic Author
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
2 years 6 days ago #828
by phenickx
Replied by phenickx on topic Regex
Hi,
Thanks for your reply.
I try to use the following code, which should highlight something like [A] or [C#maj]
/(\[[A-G][#b]?(maj|min)?\])/
but it does not appear to do anything.
Many thanks for your help with this.
Peter.
Thanks for your reply.
I try to use the following code, which should highlight something like [A] or [C#maj]
/(\[[A-G][#b]?(maj|min)?\])/
but it does not appear to do anything.
Many thanks for your help with this.
Peter.
Please Log in or Create an account to join the conversation.
- dneilsen
- Offline
- Administrator
Less
More
- Posts: 36
- Thank you received: 0
2 years 6 days ago - 2 years 6 days ago #829
by dneilsen
Replied by dneilsen on topic Regex
Where abouts are you putting the regex code?
Also, I'm surprised that the default chord highlighting is not already doing this for you?
It probably will if you put a space inside the square brackets.
Eg [ c#maj ]
Also, I'm surprised that the default chord highlighting is not already doing this for you?
It probably will if you put a space inside the square brackets.
Eg [ c#maj ]
Last edit: 2 years 6 days ago by dneilsen.
Please Log in or Create an account to join the conversation.
- phenickx
- Topic Author
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
1 year 11 months ago #830
by phenickx
Replied by phenickx on topic Regex
Hi,
I replied earlier but it seemed to have got lost somewhere.
Putting a space inside the brackets did not make a difference. I am putting the code in the Settings > Lyric Display -Txt Files > Chord Highlighting > Regex Filter. Chord Highlighting is enabled.
I replied earlier but it seemed to have got lost somewhere.
Putting a space inside the brackets did not make a difference. I am putting the code in the Settings > Lyric Display -Txt Files > Chord Highlighting > Regex Filter. Chord Highlighting is enabled.
Please Log in or Create an account to join the conversation.
- dneilsen
- Offline
- Administrator
Less
More
- Posts: 36
- Thank you received: 0
1 year 11 months ago #832
by dneilsen
Replied by dneilsen on topic Regex
I must admit that i am not very good at regex myself and it took me ages to figure out the default chord highlighting regex expression (which was several years ago) to detect/mark chords.
Your regex expression looks overly simplistic and short though in comparison to my default one so I would suggest looking closer at my default one, using it as a base and adjusting it from there.
Your regex expression looks overly simplistic and short though in comparison to my default one so I would suggest looking closer at my default one, using it as a base and adjusting it from there.
Please Log in or Create an account to join the conversation.
Time to create page: 0.126 seconds