A helpful hand in a drak night ;-)
I have found this for now:
$text ="[link]www.copy.de Linktext[/link]";
$text =~ s,\[link\](\S+)(.*)\[\/link\],<a href=\"http://$1\">$2</a>,g;
makes:
a href="http://www.copy.de"> Linktext</a
The problem is still the space, with \S+ i test till a space, but i must test better till a comma e.g.
Then it could go:
[link]gt.com,Linktext[/link]
Its important to me, to write less as possible in a text (cause we have a lot of texts inside the page ;-)
Just another easy one for you, i hope:
test on /text/ or /text/text/ or /text/..../text/
and print: a href=/.../
cause my cats are still at the root, i can link them with /cars/sportcars/
Robert
I have found this for now:
$text ="[link]www.copy.de Linktext[/link]";
$text =~ s,\[link\](\S+)(.*)\[\/link\],<a href=\"http://$1\">$2</a>,g;
makes:
a href="http://www.copy.de"> Linktext</a
The problem is still the space, with \S+ i test till a space, but i must test better till a comma e.g.
Then it could go:
[link]gt.com,Linktext[/link]
Its important to me, to write less as possible in a text (cause we have a lot of texts inside the page ;-)
Just another easy one for you, i hope:
test on /text/ or /text/text/ or /text/..../text/
and print: a href=/.../
cause my cats are still at the root, i can link them with /cars/sportcars/
Robert