SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast nguip's Avatar
    Join Date
    Apr 2001
    Location
    Malaysia
    Posts
    95
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Regexp question..

    Hi,

    Can someone please help me to look at this script here ? I don't know what's wrong with this...

    PHP Code:
    if (empty($weight)||(!ereg("^[[:digit:]]{2,3}\\.?[[:digit:]]{0,2}$",$weight))) $stop "ERROR: Invalid body weight<br />"

    Thanks
    Ngu I.P.
    Web Developer

  2. #2
    SitePoint Enthusiast nguip's Avatar
    Join Date
    Apr 2001
    Location
    Malaysia
    Posts
    95
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    BTW, can someone tell me what's the different between "\" and "\\" in the following case?

    PHP Code:
    if(ereg("^(.+)@(.+)\\\\.(.+)$",$email)) {

    something...


    and

    PHP Code:
    if(ereg("^(.+)@(.+)\\.(.+)$",$email)) {

    something ...

    Last edited by nguip; Jul 9, 2001 at 02:05.
    Ngu I.P.
    Web Developer


Bookmarks

Posting Permissions

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