in reply to converting user friendly regex to perl friendly
Note, completely untested code, written from memory
Most likely this code won't compile, but it's a starting point.if($_ =~ s/\[(\d+)-(\d+)\]/){ s/\[(\d+)-(\d+)\]/command if(\$x >= $1 && \$x <= $2);/; eval $_; }
|
|---|