laziness, impatience, and hubris | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I'm throwing in the towel in this one. I'm trying to use this Rex sed function. I want to be able to capture the match on the left and insert it back into the replacement pattern with $1 but nothing I've tried works. I know I'm missing something simple. Here's my latest iteration: sed qr{("name": "$section",\n.*\n.*)}, '$1' . $json, $groups_file, multiline => TRUEBut this just inserts "$1" into the file before the $json. If I do: $1$json The $1 is empty. Presumably because it is replaced with '' during runtime.
$PM = "Perl Monk's"; In reply to Using a regex capture as part of a varible by nysus
|
|