Skip to main content

Regex preview highlight bug


jkr_wrk
Influencer
Forum|alt.badge.img+29

The preview highlights the letters Op but the Regex only replaces the quotes (as expected):

 

Result:

‘Op. test ’ will become _Op. test _

2 replies

liamfez
Influencer
Forum|alt.badge.img+35
  • Influencer
  • July 24, 2024

Well that is interesting. I am not seeing that extra highlighting with 2021.1 and 2022.1 when I test your string. I tried double and single quotes in the string and in the regex.

I am not the best with regex but do you need 2 single quotes?


virtualcitymatt
Celebrity
Forum|alt.badge.img+36

I did some experimenting and what able to reproduce it but it was a bit weird and seems to be a result of copy and paste.

If I hand type the test string and regex I get a good result, If I copy and paste the text from your question about I get 0 matches. If I copy use the quote mark from the text string I gut the same result as you. 

 

Typed

From the text in your question

 


Copied quotes into regex


Somehow I’m guessing there is a difference in the encoding here. Maybe UTF-16 vs UTF-8


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings