Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Behaviour of regular expressions changed 2 months ago #9201

Open
fraternl opened this issue Jan 10, 2025 · 1 comment
Open

Behaviour of regular expressions changed 2 months ago #9201

fraternl opened this issue Jan 10, 2025 · 1 comment

Comments

@fraternl
Copy link

fraternl commented Jan 10, 2025

I noticed a change in behaviour 2 months ago when using regular expression.
I made a ticket, but it was just closed without a change in code.

#8996

I used a regular expression to remove superfluous musical notes in the middle of a "paragraph".
I only want a musical symbol at the start and at the end. Not on each line within the 2 rows

In this example there are 4 musical symbols, but I only want 2.

<i>♪ You liked him? ♪
♪ - Oh, it's beautiful. ♪</i>

With the expression "** ♪$**" only the 2nd one should be removed.

I now know what has changed.
What has changed is that there's only 1 line ending in that text.
Before it would also see the <br> as a line ending.

I can make this new behaviour to good use by using this expression "^-" to remove the dialog dash of the first line.
The 2nd line with the dash will then remain.

It does this only when you use "replace" repetitively,
If you use "replace all" all of them will be removed.

I wonder if the behaviour change is intended.
Like I wrote.... I can now put it to good use.

I have a workaround for removing the musical symbols and use the expression ♪\r\n♪ and replace it with \r\n

@techguru0
Copy link

wonder if SE could use code from notepad++ for the search and regular expression
it has really good options for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants