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

  • Home
  • SEARCH
  • 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 6061483
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:56:35+00:00 2026-05-23T08:56:35+00:00

I am tryign to return a no match if a person enters a title

  • 0

I am tryign to return a no match if a person enters a title in the input box I have setup..

What I have so far is:

^\s*(?!Dr|Mr|Mrs|Miss|Ms).*?$

This works fine except it won’t match “Drake”, “Missy” and it even matches “Dr.Dennis”
or ” Dr Dennis”.. I know it would be easier to do a reverse and match on the person’s title but I’d have to rewrite our entire validaton rules since all the others return matches and error’s out on non matches.

Anyone have an idea how I can do this?

  • 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-05-23T08:56:35+00:00Added an answer on May 23, 2026 at 8:56 am

    You can add a word boundary to your negative look ahead like this

    ^\s*(?!(?:Dr|Mr|Mrs|Miss|Ms)\b).*?$
    

    See it here on Regexr

    Hope I understood you correctly. This word boundary \b ensures that there is a non word character after your title, so that it will not ignore stuff like Drake.

    The (?:) is a non capturing group, meaning the stuff from your list is not put in a variable as result like a normal group () would do.

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

Sidebar

Related Questions

String.prototype.is_email = function() { return this.match(/[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?.)+(?:[A-Z]{2}|com|org|net|gov|mil|biz|info|mobi|name|aero|jobs|museum)b/); }; I'm trying to get all my javascript
I have a javascript chat bot where a person can type into an input
I'm trying to write a query that will return the closest match from a
I'm trying to return a left child as a pointer I have template <typename
I have a model like this: class Entity(models.Model): entity_name = models.CharField(max_length=100) entity_id = models.CharField(max_length=30,
I am trying to return the MATCH() AGAINST() results against several tables using UNIONS,
Trying to make this into multiplayer...Needs to be up to 5 players. I have
I have tried solving this problem by posting other related questions here that focused
I'm currently trying to return a match to a Foreach statement which is contained
Not sure if the title makes sense, but I am trying to return a

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.