CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums
Results 1 to 3 of 3

Thread: Javascript Help: what does this line do

  1. #1
    Join Date
    Aug 2010

    Javascript Help: what does this line do


    I am new to JS and wanted some help. I have a script which accepts values in the format of username.number and returns the details of username.number from a database. Now the script only works for username that is alphabetical and not alphanumeric. Thus when the username is alphanumeric the search doesn't return any values. I have identified with my limited Javascript skills that the following line is the one because of which the alphanumeric value is not recognized. Is that a correct assumption? So if I add 0-9 next to A-Z will that solve the issue? If only I knew what this line did, it will be great. Any help is greatly appreciated. Thanks

    if( $entry ne "" && $entry !~ /\;/ && $entry !~ / / && $entry =~ /[a-zA-Z]+\.[0-9]+/ )

  2. #2
    Join Date
    Jul 2001
    Sunny South Africa

    Re: Javascript Help: what does this line do

    Welcome to the forums

    What you are having issues with, is called Regular Expressions.

    I am including some links here which you may find useful.


    All my Articles

  3. #3
    PeejAvery's Avatar
    PeejAvery is offline Super Moderator Power Poster
    Join Date
    May 2002

    Re: Javascript Help: what does this line do

    Welcome to the forums, sinfuldips!

    I have not doubt that you are new to JavaScript...especially since the code you posted is not even JavaScript. Can you please confirm with what language you are actually working?
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)