New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds some regex #26

Merged
merged 1 commit into from Aug 20, 2018
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.
+24 −0
Diff settings

Always

Just for now

Copy path View file
@@ -15,6 +15,18 @@ To add words and phrases to Nightbot's Blacklist head over to the [Spam Protecti
Clicking the Options button will open a popout that you can customize blacklist settings.
## Advanced Usage
### Regex
The blacklist filter also supports regular expressions (regex) for more filtering options. You can enter a regex expression with the pattern below.
> `~/[pattern]/[flags]`
### Example
`~/(\d{3}[-.])?\d{3}[-.]\d{4}/` will blacklist any like looking phone numbers such as 253.532.8757 and 321-2345.
#### Options
- *Blacklist* - This is the text box of filtered words and phrases you wish to blacklist. Entering one entry per line. You can use an asterisk (\*) as a wildcard character to dynamically filter words and phrases. For example, `test*` blocks `test`, `testing`, `testerino`, etc.
Copy path View file
@@ -13,6 +13,18 @@ To view settings for Nightbot's links filter, head over to the [Spam Protection
Clicking the Options button will open a popout that you can customize filter settings.
## Advanced Usage
### Regex
The links filter also supports regular expressions (regex) for more whitelist options. You can enter a regex expression with the pattern below.
> `~/[pattern]/[flags]`
### Example
`~/i.imgur.com\/[\d\w]+.(png|jpg|gif)/i` will whitelist imgur direct links such as ([i.imgur.com/ghOCjsn.png](https://i.imgur.com/ghOCjsn.png)), but will not allow image links ([imgur.com/ghOCjsn](https://imgur.com/ghOCjsn)), gallery links, and album links ([imgur.com/a/Tkyl6](https://imgur.com/a/Tkyl6)).
#### Options
- *Link Whitelist* - This is the list of allowed links, entered one entry per line. You can allow entire websites (example: `youtube.com`) or specific links (example: `twitter.com/nightbotapp`).
ProTip! Use n and p to navigate between commits in a pull request.