Welcome Guest, Not a member yet? Register   Sign In
preg match help
#3

[eluser]sophistry[/eluser]
you pretty much wrote the regex yourself!

Code:
http://www.tinyurl.com/([^\s]+)

that means look for the whole tiny url domain with http:// and then capture anything that is not a space character. this won't work if the urls are in hrefs (as in the urls are in HTML code rather than straight txt) because typically the href uses double quotes to delimit the end of the url. in that case you should be able to just replace the \s with ".

with that in preg_match function you'll have the tinyurl string in array item 1.

let us know.

cheers.


Messages In This Thread
preg match help - by El Forum - 06-16-2008, 04:31 PM
preg match help - by El Forum - 06-16-2008, 07:51 PM
preg match help - by El Forum - 06-17-2008, 06:37 AM



Theme © iAndrew 2016 - Forum software by © MyBB