gibigbig Posted April 12, 2010 Share Posted April 12, 2010 can anyone give me the regular expression for: http://www.4shared.com/embed/261987034/3ce33fcf thanks Quote Link to comment https://forums.phpfreaks.com/topic/198264-regular-expression-error/ Share on other sites More sharing options...
TeddyKiller Posted April 12, 2010 Share Posted April 12, 2010 Why? and what do you mean by "Regular expression" Quote Link to comment https://forums.phpfreaks.com/topic/198264-regular-expression-error/#findComment-1040285 Share on other sites More sharing options...
gibigbig Posted April 12, 2010 Author Share Posted April 12, 2010 a regular expression looks something like this http://[w\.]*4shared\.com/embed/([\w]+)/([\w]+)[&\w;=+_-]* Quote Link to comment https://forums.phpfreaks.com/topic/198264-regular-expression-error/#findComment-1040293 Share on other sites More sharing options...
salathe Posted April 12, 2010 Share Posted April 12, 2010 ~http://www\.4shared\.com/embed/261987034/3ce33fcf~ Quote Link to comment https://forums.phpfreaks.com/topic/198264-regular-expression-error/#findComment-1040349 Share on other sites More sharing options...
newbtophp Posted April 12, 2010 Share Posted April 12, 2010 Damn, salathe, your too quick, wait for me to do this! (praticing regex) ~http://www\.4shared\.com/embed/([0-9]+)/([0-9a-z]+)~ Quote Link to comment https://forums.phpfreaks.com/topic/198264-regular-expression-error/#findComment-1040351 Share on other sites More sharing options...
Ken2k7 Posted April 12, 2010 Share Posted April 12, 2010 Here's a question: if you're matching a literal string and not a pattern, why use regular expression? Quote Link to comment https://forums.phpfreaks.com/topic/198264-regular-expression-error/#findComment-1040354 Share on other sites More sharing options...
salathe Posted April 12, 2010 Share Posted April 12, 2010 Here's a question: if you're matching a literal string and not a pattern, why use regular expression? I'm guessing that's not the intention, but the OP is not being particularly clear on what they are trying to do. gibigbig, please describe clearly what you want to do as that will dictate the best solution for you. For example, do you have a whole HTML page containing some links and you want to get the 4shared.com URLs out of that HTML? Do you want to match any link, or just that one link, or...? Quote Link to comment https://forums.phpfreaks.com/topic/198264-regular-expression-error/#findComment-1040363 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.