Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Regex pattern

Regex pattern

Scheduled Pinned Locked Moved ASP.NET
toolsregexcomdesigntesting
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    padmanabhan N
    wrote on last edited by
    #1

    Hi Experts, The below given is the Regex pattern for validating e-mail. I have to do it in 2 ways one is through UI and another one is through excel import. In UI i am using the same Regex pattern as given below using regularexpressionvalidator. It is correctly validation "sam@ple@code.com" and "'sam@ple@code.com'" - @@ and '' are correctly restricted in UI but when i use the same in code it is not validationg the given 2 email ids and allowing me to insert. how to avoid double @ and single quoted. i want the Regex pattern. can anyone help me in this? UI- working fine === ValidationExpression="\w+([-+.']\w+([-]*))*@\w+([-.]\w+)*\.\w+([-.]\w+)*" Inside code - not working for double @ and ' ============ Regex patternMatch = new Regex("\\w+([-+.']\\w+([-]*))*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*");//("(\\d|-| | )*");

    Padmanabhan My Articles: Articles[^] My latest Article: Word Automation[^]

    K 1 Reply Last reply
    0
    • P padmanabhan N

      Hi Experts, The below given is the Regex pattern for validating e-mail. I have to do it in 2 ways one is through UI and another one is through excel import. In UI i am using the same Regex pattern as given below using regularexpressionvalidator. It is correctly validation "sam@ple@code.com" and "'sam@ple@code.com'" - @@ and '' are correctly restricted in UI but when i use the same in code it is not validationg the given 2 email ids and allowing me to insert. how to avoid double @ and single quoted. i want the Regex pattern. can anyone help me in this? UI- working fine === ValidationExpression="\w+([-+.']\w+([-]*))*@\w+([-.]\w+)*\.\w+([-.]\w+)*" Inside code - not working for double @ and ' ============ Regex patternMatch = new Regex("\\w+([-+.']\\w+([-]*))*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*");//("(\\d|-| | )*");

      Padmanabhan My Articles: Articles[^] My latest Article: Word Automation[^]

      K Offline
      K Offline
      Keith Barrow
      wrote on last edited by
      #2

      I use this : www.regxlib.com [^], otherwise I'll whittle my life away creating the "perfect" regex :)

      Sort of a cross between Lawrence of Arabia and Dilbert.[^]
      -Or-
      A Dead ringer for Kate Winslett[^]

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups