Lazyuki / ReTitle

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

Option to turn off "| Regex Error: No pattern Match" #65

Open tomernahum opened 1 year ago

tomernahum commented 1 year ago

I am new to regex so maybe theres another way around this, also its not super important.

Anyway youtube sometimes gives you a tab like this: "(1) Title of Video", if you have notifications from youtube. I wanted to get rid of the (1) .

So I wrote this regex replacement thing: /^([0-9]+)./‎/
(which has an empty character between // at the end) I tested it by googling stuff starting with (1)

It works but if there is no (1) then it says "| Regex Error: No pattern Match", but I do not care.

So maybe there could be a setting in the advanced features not to show this message. Up to you Or maybe there is a regex I could have written that accounts for this, if you know it feel free to comment

jathek commented 1 year ago

/^(\(\d+\) )?(.*)$/‎$2/

This might work.

tomernahum commented 1 year ago

thanks it does!