MyBB Community Forums

Full Version: Help with imgur hash+file type extractor
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi, can anyone help me with extracting the hash + file type on imgur.com?

This is what I got so far:
\[imgur\]http:\/\/([a-zA-Z]?)+(\.)?i\.imgur\.com\/(.*?)\[/imgur\]
(This only gives me: 7eQM7.gif in $3)

I want it to give me:
[imgur]http://i.imgur.com/7eQM7.gif[/imgur]

$3 (Hash)
$4 (Filetype)

///
Nevermind, found the solution already:
\[imgur\]http:\/\/([a-zA-Z]?)+(\.)?i\.imgur\.com\/(.+)\.([a-z^\.]+)\[/imgur\]
It seems, it only works when there's one in the post. If there's more of them in 1 post, it tries to combine them?

Anyone knows how to fix it?