Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Aug 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    regexp problem ?

    i have this statement

    chkNamePattern=/^((?!.*(www|http|\\|\/|@|\.[a-zA-Z]+))([а-яА-ЯA-Za-z\-\.,])+?(\s*)([а-яА-ЯA-Za-z0-9_\.\-,])*)+$/ig;

    but error

    Microsoft JScript ошибка '800a139a'

    n=/^((?!.*(www|http|\\|\/|@|\.[a-zA-Z]+))([A-Za-z\-\.,])+?(\s*)([A-Za-z0
    ------^

    -9_\.\-,])*)+$/ig;


    has been occured

    the problem is in sign ?

    i dont know why ? its additional regexp syntax

    on my own DEV environment (w 2003 sp1) all is ok
    by on company's DEV ENV ( w 2000 sp3) i have got error

  • #2
    Senior Coder
    Join Date
    Dec 2002
    Location
    Arlington, Texas USA
    Posts
    1,072
    Thanks
    4
    Thanked 8 Times in 8 Posts
    Since this is giving you a server side error doesn't your regex need to be in quotes?

    chkNamePattern="/^((?!.*(www|http|\\|\/|@|\.[a-zA-Z]+))([а-яА-ЯA-Za-z\-\.,])+?(\s*)([а-яА-ЯA-Za-z0-9_\.\-,])*)+$/ig";

  • #3
    New to the CF scene
    Join Date
    Aug 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    no .. according to msdn regexp needn't to be in quotes

    it looks like i have found whats a problem

    on company's DEV only sp3 for w2k was installed
    admins has already been asked to setup sp4 and if it doesn't check problem
    they will install this : "Windows Script 5.6 for Windows XP and Windows 2000 "

    i hope it checks my problem

    thanks

  • #4
    New Coder
    Join Date
    May 2007
    Location
    SF, CA
    Posts
    55
    Thanks
    0
    Thanked 4 Times in 4 Posts
    That actually sense. regex in vbscript was added as of version 5 I believe. You would normally have a version of vbscript that supports regex if IE 5.0 was installed (most likely it wasn't).

    You can check the VBScript version by using the following asp page.

    PHP Code:
    <%
    Response.Write "You are using "
    Response.Write ScriptEngine
    Response
    .Write " version " ScriptEngineMajorVersion "." ScriptEngineMinorVersion
    %> 
    semper fi..

  • #5
    Senior Coder
    Join Date
    Dec 2002
    Location
    Arlington, Texas USA
    Posts
    1,072
    Thanks
    4
    Thanked 8 Times in 8 Posts
    By the error he posted though it looks like his code is in JScript

  • #6
    New Coder
    Join Date
    May 2007
    Location
    SF, CA
    Posts
    55
    Thanks
    0
    Thanked 4 Times in 4 Posts
    I think both VBScript and JScript share code (both coming from Microsoft). Basically there are two ways you get JScript/VBScript installed on a Windows computer, either install Internet Explorer or install Windows Script Host.

    The wiki entry for JScript goes into which version installs what

    http://en.wikipedia.org/wiki/Jscript

    semper fi...


  •  

    Posting Permissions

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