how to add new keywords?

Subscribe to how to add new keywords? 2 posts, 2 voices

justin759 User

Hi! I want to add a keyword "測驗" to the filter, how should I edit the code?


myqwong Script's Author

Hi Justin,

You can add |測驗 to the back of the regular expression, like this

var regEx = /t(ake|ook)\s*th(e|is)\s*quiz/i;


var regEx = /t(ake|ook)\s*th(e|is)\s*quiz|測驗/i;

You also need to save the script in UTF-8 format. If you are using Windows, edit the script in Notepad (don't use WordPad) & click "Save As...", in the "Save As" dialog box, change the "Encoding" select value to "UTF-8" and click "Save".

To add a new phrase, just add a | character & the phrase to the back of the regular expression like above.

If you like, you can check out more Javascript regular expression abilities here

Get me again if you face any problems or annoying application news feeds.