2017-12-08, 03:44 PM
Hi
In mybb we post links in 2 way:
1-
So if i need to use (Replacement & Regular Expression) for case 1 i can do this way:
but in case 2 :
Is there a better replacement for case 2 ?
In mybb we post links in 2 way:
1-
[url=http://domain.com]link[/url]
2- [url]http://domain.com[/url]
So if i need to use (Replacement & Regular Expression) for case 1 i can do this way:
\[url=(.*?)\](.*?)\[/url\]
<a href="$1">$2</a>
but in case 2 :
\[url\](.*?)\[/url\]
because of some long URLs... its not good to use this replacement:<a href="$1">$1</a>
Is there a better replacement for case 2 ?
-