So, how would I match URLs not inside [ code ] tags?
I tried this (and other several modifications):
Code: Select all
'/[^(\&\#91;raw\])] ((mailto:|(http|ftp|nntp|news):\/\/).*?)(\s|<|\)|"|\\\\|\'|$) [^(\&\#91;\/raw\])]/si'I use [^(\&\#91;raw\])] instead of [^(\[raw\])] because I replace the opening-square bracket with it's corresponding entity to prevent it from being matched later on by my other Regex.
A preemptive thanks for your time.