Perl/Regex question (hopefully simple)
Madison Kelly
linux-5ZoueyuiTZhBDgjK7y7TUQ at public.gmane.org
Tue Jun 29 15:56:55 UTC 2004
Hi all,
I'm not having a lot of luck googling for the answer to this
question. I hope someone can help or point me in the right direction
(like what perldoc to read).
I am trying to do a regex substitute where I need to maintain two
pieces of dynamic data. Specifically I am trying to convert some keys
into a proper html link. For example, I want to convert:
[url=groups.google.ca]Google Groups[/url]
into
<a href="groups.google.ca" target="_new">Google Groups</a>
I was trying something like this but it isn't working...
$help_body =~ s/\[url=(.*)\](.*)\[\/url\]/(<a href=").*("
target="_new">).*(<\/a>)/gi;
So how do I go about substituting values around variable information
that I want to save?
Thanks!!
Madison
--
The Toronto Linux Users Group. Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml
More information about the Legacy
mailing list