pattern_for_links = /
(((((http|ftp|https):\/{2}|([0-9a-z_-]+\.)+)|)(([0-9a-z_-]+\.)+(com)(:[0-9]+)?
((\/([~0-9a-zA-Z\#\+\%@@\.\/_-]+))?(\?[0-9a-zA-Z\+\%@@\/&\[\];=_-]+)?)?))\b)
/gmi;
And I get this match (JS) which is fine and all matches correct:
http://www.yahoo.com
yahoo.com/wordss
www.yahoo.com
But when I add /
at the end, then /
is not included (/
not matched).
http://www.yahoo.com/
yahoo.com/wordss/
www.yahoo.com/
How can I also include /
at the end, using pattern_for_links
?
EDIT
Solution: I added \b\/?
instead of only \b
, and now /
also matched and included.