in reply to strip out of single quotes
(assuming it is always + not - and an integer). If it could happen more than once in your string, change /a to /ga.$string = "90'+7'"; $string =~ s/'(\+\d+)'/$1/a;
(assuming the first number is a not too large unsigned integer).$string = "90'+7'"; $string =~ s/(\d+)'(\+\d+)'/$1+$2/ae;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: strip out of single quotes
by frank1 (Monk) on Sep 16, 2025 at 13:49 UTC |