Perl/Regex question (hopefully simple)
Phillip Mills
pmills-Zd07PnzKK1IAvxtiuMwx3w at public.gmane.org
Tue Jun 29 16:11:20 UTC 2004
On Jun 29, 2004, at 11:56 AM, Madison Kelly wrote:
> So how do I go about substituting values around variable information
> that I want to save?
This should get you closer:
#!/usr/bin/perl
my $help_body = '[url=groups.google.ca]Google Groups[/url]';
$help_body =~ s/\[url=(.*?)\](.*?)\[\/url\]/<a href="$1"
target="_new">$2<\/a>/gi;
print $help_body;
........................
Phillip Mills
Multi-platform software development
(416) 224-0714
--
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