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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:59:55+00:00 2026-05-25T12:59:55+00:00

I need to extend this regex to remove space characterless. We use ASP.NET validation

  • 0

I need to extend this regex to remove space characterless. We use ASP.NET validation using asp:RegularExpressionValidator so I can’t use replace method in between.

Here is my Regex:

\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*

Hre the code

<asp:TextBox ID="tbBIEmailAddress" runat="server" CssClass="inpText" MaxLength="50" />

<asp:RequiredFieldValidator id="reqValBIEmail" runat="server" ControlToValidate="tbBIEmailAddress" Display="Dynamic" ValidationGroup="Checkout">*</asp:RequiredFieldValidator>

<asp:RegularExpressionValidator id="regValBIEmail" runat="server" ControlToValidate="tbBIEmailAddress" ValidationGroup="Checkout" ValidationExpression="\^w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$">*</asp:RegularExpressionValidator>
  • 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-25T12:59:55+00:00Added an answer on May 25, 2026 at 12:59 pm

    I know that .Net has the concept of variable number of capture buffers.
    So for instance, (asw[^p]+)* should create a capture buffer 1 object that
    stores data as an array.

    However, its not clear how it would react in this case: (?:([-.]\w+)|\s+)*
    Clearly \s is not in the scope of a capture buffer, and should not be included in
    the group 1 capture buffer object array. In effect stripping whitespace in the
    process of capture. But I didn’t test this.

    I could be reading your question wrong though and for all I know, you are using capt groups for just grouping.

    added

    Your sample might have a typo.
    This:
    "\^w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$"
    should probably be this:
    "^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$"

    Its possible that explains your space problem but probably not.

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

Sidebar

Related Questions

I need to extend a class, which is encapsulated in a closure. This base
I need to extend a regex pattern in C#. The current pattern is capturing
I'm working with ASP.Net MVC as well as DynamicData and I need to add
I have an array of words I need to do a find-and-replace by regex
I find this selector format cumbersome if I need to use it often: $('[name=someElementName]').val()
I'm using an API that has a Member class. I wish to extend this
Hey guys, I'm wondering if anyone can help me extend this bit of code-
I need to extend an element in an XSD schema. In the original schema,
Hi I need to extend the CListControl class in C++/MFC, which will add several
Need to locate the following pattern: The letter I followed by a space then

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.