#!/usr/bin/perl $text = 'YAY! <a href="/cgi-bin/ruling?candy=265-23&path=/rules/other/ +265-23&file_num=265-23&action=Show_Form" class="subCat9">Click to sub +mit</a> YAY!'; $find='<a href="/cgi-bin/ruling?candy=265-23&path=/rules/other/265-23& +file_num=265-23&action=Show_Form" class="subCat9">Click to submit</a> +'; $replace="This is a replacement"; # Would like to see # YAY! This is a replacement YAY! $text=~s/$find/$replace/g; print $text; # I get # YAY! <a href="/cgi-bin/ruling?candy=265-23&path=/rules/other/265-23& +file_num=265-23&action=Show_Form" class="subCat9">Click to submit</a> + YAY!
In reply to Regex can't find match by sherab
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |