brandon1024 / find

A find-in-page extension for Chrome and Firefox that supports regular expressions.
https://chrome.google.com/webstore/detail/find%2B-regex-find-in-page/fddffkdncgkkdjobemgbpojjeffmmofb
GNU General Public License v3.0
402 stars 52 forks source link

Finding "not numbers" doesn't work? #391

Closed mzso closed 1 year ago

mzso commented 1 year ago

Issue Description

Not sure if I'm missing something or it just plain doesn't work. I tried this: [^0-9](2|3)m To find stuff that are 2 or three minutes long, but not 12, 13. But it doesn't find anything for example finding this: 2m 06s 270ms, but not this: 13m 30s 660ms

If I use this expression: [0-9](2|3)m it finds 12, 13 minute items, but if I try to negate, I get nothing. Example url: https://www.speedrun.com/hogs_of_war/levels

Am I missing something?

brandon1024 commented 1 year ago

This is because [^0-9] requires a character before the (2|3). If there's no text before the 2 or 3, it won't turn up any results. Something like ^\dm would work better for you.

I recommend using a tool like this to test your regular expressions: https://regexr.com/

mzso commented 1 year ago

Thanks!