Activity Stream
48,167 MEMBERS
6711 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 3 of 3

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1.     
    #1
    Member
    Website's:
    UsersTracking.com WhatIsNanoSim.com TVShowsBB.com WhatIsSurfaceTablet.com WhatIsLoan.net

    Default Help with Regex

    Hi,
    I have youtubetomp3 site, www.YoutubeToMP3.me,
    Now I have problem with videos that contain unusual chars, like
    PHP Code: 
    ";,/ 
    etc.
    Here is the 2 functions that Saved the name from youtube:
    PHP Code: 
            function ExtractSongTrackName($vidSrc$srcType)
            {
                
    $name '';
                
    $vidSrcTypes $this->GetVidSrcTypes();
                if (
    in_array($srcType$vidSrcTypes))
                {
                    
    $vidSrc = ($srcType == $vidSrcTypes[1]) ? file_get_contents($vidSrc) : $vidSrc;
                    if (
    $vidSrc !== false && eregi('eow-title',$vidSrc))
                    {
                        
    $name end(explode('eow-title',$vidSrc));
                        
    $name current(explode('">',$name));
                        
    $name end(explode('title="',$name));
                    }
                }
                return 
    $name;
            } 

    PHP Code: 
           private function SetSongFileName($file_contents)
            {
                
    $vidSrcTypes $this->GetVidSrcTypes();
                
    $trackName $this->ExtractSongTrackName($file_contents$vidSrcTypes[0]);
                return 
    $this->_songFileName = (!empty($trackName)) ? self::_SONGFILEDIR preg_replace('/_{2,}/','_',preg_replace('/ /','_',preg_replace('/^[A-Za-z0-9]+$/','',$trackName))) . '.mp3' '';
            } 

    Regards.
    ChaoscripT Reviewed by ChaoscripT on . Help with Regex Hi, I have youtubetomp3 site, www.YoutubeToMP3.me, Now I have problem with videos that contain unusual chars, like ";,/ etc. Here is the 2 functions that Saved the name from youtube: function ExtractSongTrackName($vidSrc, $srcType) { $name = ''; $vidSrcTypes = $this->GetVidSrcTypes(); if (in_array($srcType, $vidSrcTypes)) { Rating: 5
    Nano Sim Cutter | TVShowsBB.com | UsersTracking.com - Online Visitor Counter
    WhatIsSurfaceTablet.com | What Is Loan

  2.   Sponsored Links

  3.     
    #2
    Member
    What exactly is your problem?
    If you want to apply RegEx to them, you can escape the chars with a backslash (if needed).

  4.     
    #3
    Member
    Website's:
    UsersTracking.com WhatIsNanoSim.com TVShowsBB.com WhatIsSurfaceTablet.com WhatIsLoan.net
    I want that the songs names will be in the same like youtube name.
    But I have problem with unusual chars, How I can delete them or something?
    I also wants that it'll worked with Hebrew language.

    Regards.
    Nano Sim Cutter | TVShowsBB.com | UsersTracking.com - Online Visitor Counter
    WhatIsSurfaceTablet.com | What Is Loan

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Regex in shell
    By mahjong in forum Server Management
    Replies: 0
    Last Post: 8th Apr 2012, 08:58 AM
  2. Need help with RegEx
    By dima1236 in forum Web Development Area
    Replies: 7
    Last Post: 14th Jan 2012, 05:53 PM
  3. Need help with Regex - VB.NET
    By Connor in forum Web Development Area
    Replies: 2
    Last Post: 27th Sep 2011, 05:11 PM
  4. php help regex!
    By ?RaJ? in forum Technical Help Desk Support
    Replies: 7
    Last Post: 26th Apr 2011, 09:22 PM
  5. need help with some regex
    By t3od0r in forum Web Development Area
    Replies: 1
    Last Post: 13th Aug 2010, 04:23 PM

Tags for this Thread

BE SOCIAL