I was looking at the source code of these forums for something, and found some regular expressions.
They looked like this:
'/http:\/\/.*(imgur|tinypic|imageshack|photobucket|modshare|scratch\.mit|scratchr\.org|wikipedia\.org|wikimedia\.org|\.edu).*\/.*/i
It looked like a big pain to escape all of those slashes.
However, in Perl Compatible Regular Expressions, you don't have to use a slash to delimit the start and end. You can use any kind of punctuation mark.
In FluxBB, they use a % sign (e.g. %http://(foo|bar)%i), and not have to escape all of those slashes.
Offline