kennygadams
Programmer
Hello Programmers,
With s///g, I want to change every occurrence of "flowers" to "Flowers" but I want to avoid making changes to patterns that are found between <>. Can this be done? If so, how?
Here is the code that I'm working with:
Thanks,
Kenny Adams
With s///g, I want to change every occurrence of "flowers" to "Flowers" but I want to avoid making changes to patterns that are found between <>. Can this be done? If so, how?
Here is the code that I'm working with:
Code:
$string = "This red Hibiscus flower was sitting in the warm afternoon sun when it was photographed showing its beauty. <a href=[URL unfurl="true"]http://www.acclaimimages.com/search_terms/flowers.html><font[/URL] color=blue>More flowers Here...</font></a>";
$find = 'flowers';
$replace = 'Flowers';
$string =~ s/$find/$replace/g;
Thanks,
Kenny Adams