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 4346802
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T12:13:18+00:00 2026-05-21T12:13:18+00:00

Here are my two reg expressions. The first one seems to match my case

  • 0

Here are my two reg expressions. The first one seems to match my case insensitive string exactly, but the second one has a space and isn’t working.

^([wW][eE][eE][kK][5][0][0])$


^([wW][eE][eE][kK][/s][5][0][0])$

So I have two problems:
1) What do I change so that my first reg expression in my asp RegularExpressionValidator will not match my “Week500” case insensitive, entire string? I only want it to fire if this entire string (albeit case insensitive) is matched. Currently this reg expression is doing the opposite of what I need.

2) I also need this same change for my second reg expression in my second asp RegularExpressionValidator. However, it has a space in a specific place in the string “Week 500”.

Here are the complete tags for my two RegularExpressionValidators on my asp page:
<asp:RegularExpressionValidator ID="revPrevEventNameDup" runat="server" ControlToValidate="txtGenerateEventsPreviewEventName" EnableClientScript="true" ErrorMessage="Dup Name" Display="Dynamic" ValidationExpression="^([wW][eE][eE][kK][5][0][0])$" ValidationGroup="GenerateEventsPreviewValidation" />

<asp:RegularExpressionValidator ID="revPrevEventNameDup" runat="server" ControlToValidate="txtGenerateEventsPreviewEventName" EnableClientScript="true" ErrorMessage="Dup Label" Display="Dynamic" ValidationExpression="^([wW][eE][eE][kK][5][0][0])$" ValidationGroup="GenerateEventsPreviewValidation" />

Thank you in advance for your help.

++++++++++++++++++++++++++++++++++++++++++

I’m new so I can’t answer my own question, so it suggested I put the answer here…

Thank you all for the string help!!

You’re all GREAT!!

Here:
ASP.NET RegularExpressionValidator, validate on a non-match?

I found that I had to add:
^(?!

to the front and:
$).*$

to the end to get the validate on a non-match.

So here are my two finial RegularExpressionValidators for my asp page that work GREAT!!

ValidationExpression="^(?!([wW][eE][eE][kK]500)$).*$"

ValidationExpression="^(?!([wW][eE][eE][kK] 500)$).*$"

THANK YOU!!!

  • 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-21T12:13:18+00:00Added an answer on May 21, 2026 at 12:13 pm

    The white-space matching regular expression is \s, not /s.

    ^([wW][eE][eE][kK][\s][5][0][0])$
    

    If all you need is a space, just type it.

    ^([wW][eE][eE][kK] [5][0][0])$
    

    And, if you want to match a single character, just type those too, unless they are special:

    ^([wW][eE][eE][kK] 500)$
    

    And in all cases, if \ is special to your string holder, you may need to escape the escape character, using \\.

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

Sidebar

Related Questions

Here are two queries that return the same resultset, but which is the optimal
Here's two screen shots, showing the effect with a small viewport that has to
Here is two variants. First: int n = 42; int* some_function(int* input) { int*
Here is two my variants of method, which returns a string, associated with enum
I have here two applications in two different projects in eclipse. One application (A)
Can you please help me, Here two for loops, once the first iteration ends,
Here are two different questions but I think they are related. When using Git,
i want to call two url in one webview one after the another but
Here are two reasons to think strings are objects. First, you can create a
Here's two ways of doing string substitution: name = Tshepang my name is {}.format(name)

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.