Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

substitution including parenthases

Status
Not open for further replies.

1DMF

Programmer
Jan 18, 2005
8,795
GB
Hi,
I'm having dificulty matching a string that includes parenthases whiler using a back reference.

Let's say $search = "Me & You (Hard Frequencies Remix)" and $_->{'Disp_Title'} contains that string.

This is what I have...
Code:
$_->{'Disp_Title'} =~ s/(\Q$search\E)/<span class="red"><b>$1<\/b><\/span>/gi;

But my replace isn't working?

Cheers,
1DMF

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

Google Rank Extractor -> Perl beta with FusionCharts
 
Typical, ignore my dumb ass! [deadhorse]

I'd been doing it in the wrong place!

It works fine - [lol]

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

Google Rank Extractor -> Perl beta with FusionCharts
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top