Lazyuki / ReTitle

Chrome/Firefox extension for renaming tab titles easily
74 stars 7 forks source link

Odd Regex bug #32

Open markran opened 4 years ago

markran commented 4 years ago

I discovered what appears to be an odd bug retitling this page: https://smile.amazon.com/Native-Instruments-Komplete-Kontrol-Ultimate/dp/B076NWVQG1

With this it works as expected: /AmazonSmile: (.{0,46}).*/$1/gi and gives a title of: Native Instruments Komplete Kontrol S61 MKII w

But if I change the value "46" to "45" like this:/AmazonSmile: (.{0,45}).*/$1/gi it gives an error with a title of Native Instruments Komplete Kontrol S61 MKII | Regex Error: No pattern Match

Both regexes work as expected at the test site: https://regex101.com using this as the Test String: AmazonSmile: Native Instruments Komplete Kontrol S61 MKII with Komplete 11 Ultimate: Musical Instruments

Lazyuki commented 4 years ago

Hmm might be something to do with the space at the end... I'll check