in reply to Re: Substituting with match containing newline and space characters
in thread Substituting with match containing newline and space characters
Thanks, I need to go through the file and that didn't work for me in the 'while'...
while ($my_file =~ /(input type=\"checkbox\".*?\.(\w+)\[0\]\")/sg) { my $sub = $1; my $sub1 = $2; $my_file =~ s/\Q$sub\E/\Q$sub\E id=\"$sub1\"/;
This gets the code swapping out, but is now littered with escape characters...may go down the parser route, but good to know about the escaping.
Thanks for your help
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Substituting with match containing newline and space characters
by jeffa (Bishop) on Mar 30, 2015 at 18:11 UTC | |
by MorayJ (Beadle) on Mar 31, 2015 at 11:27 UTC |