Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8285881
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T11:34:25+00:00 2026-06-08T11:34:25+00:00

I am looking for the perfect 1 line regex pattern to block a huge

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T11:34:28+00:00Added an answer on June 8, 2026 at 11:34 am
    1. Take url and remove all [^a-zA-Z] – replace them by empty string
    2. Take list of all not allowed words or phrases and do same as (1)
    3. With such list now join all keywords with | character to one regex string
    4. Check if this regex match url you modified at (1)

    Having variables url and list, one-line jQuery solution would be:

    url.replace(/[^a-z]/gi,'').match(new RegExp("("+$.map(list,function(e){return e.replace(/[^a-z]/gi,'');}).join('|')+")"))!=null
    

    with result being true if url contains some of the restricted words or phrases from the list.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm looking for a perfect text editor :) The must have list: vim-like modal
Looking to do a bit of refactoring... Using NHibernate I have this query currently
Looking for a perl one-liner what will find all words with the next pattern:
Looking at the Slickgrid examples and using Google Chrome, I'm setting a breakpoint on
I am looking for a sample line of business app that has source code
I am looking for a way to join together 2D line segments. A line
So I've been using Handbrake command line to encode my video collection to store
I have an xml file like this. On vertical orietation everything is looking perfect.
I'm trying to get @font-face looking perfect in IE, but am short of a
I was looking around the internet and couldn't find a perfect algorithm for this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.