freelanceprogrammers.org Forum Index » Perl

Urgent Need Guidance!


View user's profile Post To page top
chdsethi Posted: Tue Jan 24, 2006 1:32 pm


Joined: 24 Jan 2006

Posts: 2
Urgent Need Guidance!
Hi all

I m using Perl with CGI to write scripts, and very well comfortable
with Perl Connectivity to CGI.

I m using pattern-matching so that i `ll be able to dispaly that
particular matched string in someother color say it normal text in
black and those matching the pattern in red.

Plz Help Me!

Regards

Sethi
Reply with quote
Send private message
View user's profile Post To page top
Rob_Wilson_98 Posted: Tue Jan 24, 2006 7:49 pm


Joined: 02 Aug 1999

Posts: 11
Urgent Need Guidance!
--- In Perl_Official@yahoogroups.com, "chdsethi" <chdsethi@y...> wrote:
>
>
> Hi all
>
> I m using Perl with CGI to write scripts, and very well comfortable
> with Perl Connectivity to CGI.
>
> I m using pattern-matching so that i `ll be able to dispaly that
> particular matched string in someother color say it normal text in
> black and those matching the pattern in red.
>
> Plz Help Me!
>
> Regards
>
> Sethi
>

$output_string is what you intend to return to the user.
$string_to_match is that regular expression or string you want to match.

$output_string =~ s/($string_to_match)/<font color=red>$1</font>/gm;
Reply with quote
Send private message
Post new topic Reply to topic
Display posts from previous:   
 

All times are GMT
Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Freelace Website Designer - Customer web design and software building.
China Wholesale - Electronics Products
Character Studio - Tutorials and Help