futpib / policeman

Firefox extention for cross-site requests control (kind of RequestPolicy clone)
https://addons.mozilla.org/en-US/firefox/addon/policeman/
142 stars 11 forks source link

A problem about regular expression #231

Open dxdragon opened 8 years ago

dxdragon commented 8 years ago

sometimes we need block some host like x.example.com, where x represents a single character. so a alternative method is to create rules with user of ruleset, e.g.

rules:
  web -> web:
    -> [A-Za-z].example.com: REJECT
  # Or
  # -> /\w\.example\.com/: REJECT

But the fact is whether '[A-Za-z]' or '\w' matches one more character(s). And then I test another metacharacter \d, it performs as general regex...Maybe that's a bug for policeman.