Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2006
    Posts
    3,970
    Tokens
    0

    Latest Awards:

    Default What am I doing wrong?

    I'm trying to detect if a Youtube video is valid, but they are all invalid I can't work out what's wrong with the preg_match.

    PHP Code:
    else if( !preg_match"/http:\/\/(.*)youtube(.*)\/watch?v=(.*)/"$yturl ) ) {
        echo 
    "<div class=\"regerror\">Invalid Youtube URL</div>";

    Lets set the stage on fire, and hollywood will be jealous.

  2. #2
    Join Date
    Oct 2006
    Location
    Peterborough, UK
    Posts
    3,855
    Tokens
    216

    Latest Awards:

    Default

    Quote Originally Posted by Tom743 View Post
    I'm trying to detect if a Youtube video is valid, but they are all invalid I can't work out what's wrong with the preg_match.

    PHP Code:
    else if( !preg_match"/http:\/\/(.*)youtube(.*)\/watch?v=(.*)/"$yturl ) ) {
        echo 
    "<div class=\"regerror\">Invalid Youtube URL</div>";

    PHP Code:
    !preg_match"/http:\/\/(.*?)youtube(.*?)\/watch?v=(.*?)/"$yturl 


    visit my internet web site on the internet
    http://dong.engineer/
    it is just videos by bill wurtz videos you have been warned

  3. #3
    Join Date
    Dec 2006
    Posts
    3,970
    Tokens
    0

    Latest Awards:

    Default

    Thanks Jewish Bear
    Lets set the stage on fire, and hollywood will be jealous.

Posting Permissions

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