But it can be shortened tomy $circuit_id = ( $if_descr =~ /([^.]*)(?:\.(.*))?/ ? $1 . (defined($2) ? $2 : '') : undef );
(my $circuit_id = $if_descr) =~ s/\.//;
In reply to Re: regexp help -- grab almost a whole string
by ikegami
in thread regexp help -- grab almost a whole string
by tdruttenberg
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |