use strict; use warnings; my $str = '3p3V_MON Trip = 2.713V/2.681V'; if ($str =~ m{([\d.]+)V/([\d.])}) { print "$1 $2\n"; } else { warn "Invalid data format: $str"; }
In reply to Re: regular expression to get a decimal value
by wind
in thread regular expression to get a decimal value
by mark4444az
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |