Regular Expression problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shomun
    New Member
    • Jan 2007
    • 1

    Regular Expression problem

    Hi,
    I am new to regular expression stuffs. I am facing problem while implementing a reg. exp. for a textbox using regular expression validator in ASP page.

    Requirement:
    It will take only alphanumeric value i.e a-z,A-Z and 0-9

    I am using reg. exp. ^[a-zA-Z0-9]*$
    This is fine with a-z,A-Z and 0-9 checking but it also taking japanese characters

    Please tell me where I am worng.

    Thanks,
  • meghakumaran
    New Member
    • Feb 2007
    • 1

    #2
    try this [a-z,A-Z,0-9, ]*
    hope it works!

    Comment

    • kbipul
      New Member
      • Nov 2006
      • 27

      #3
      Originally posted by shomun
      Hi,
      I am new to regular expression stuffs. I am facing problem while implementing a reg. exp. for a textbox using regular expression validator in ASP page.

      Requirement:
      It will take only alphanumeric value i.e a-z,A-Z and 0-9

      I am using reg. exp. ^[a-zA-Z0-9]*$
      This is fine with a-z,A-Z and 0-9 checking but it also taking japanese characters

      Please tell me where I am worng.

      Thanks,
      You can best use [w]*.
      It will solve your problems

      Comment

      Working...