I am looking for the perfect 1 line regex pattern to block a huge list of porn star names using my content blocking software.
The software is fully regex-compliant, and will accept any well-written regex.
As an example, here is a line of those I currently use – the lines are identical somehow where the first blocks everything starting with, and the second blocks everything ending with my list of predefined words.
(\b(cohf|cock(s)?|cum(s)?|cutie(s)?|creamy(-)?pie(s)?))(-)?\w+\b
\w+(-)?((cam(s)?|cohf|cock(s)?|cum(s)?|cutie(s)?|creamy(-)?pie(s)?)\b)
Now, I have a list that looks like:
**pornstar1 name**
pornstar2 name
pornstar3 name
some-other name-here
I would like the offered regex to block ANY/ALL URL’s, where the two parts of the name appear – Examples:
- http://www.alink-to-pornstar1.com <– not blocked (only a part pf the
name is here) - http://www.alink-to-pornstar1-name.com <– blocked (has
the two parts)
Thank you in advance
[^a-zA-Z]– replace them by empty string|character to one regex stringHaving variables
urlandlist, one-line jQuery solution would be:with result being
trueifurlcontains some of the restricted words or phrases from thelist.