You probably want something like:
sub _print_nodeandip { my @ips; open my $FILE_FH, '<', $File or die "Failed to Open File $File for +: $!"; while ( <$FILE_FH> ) { my $node = ( split /,/ )[ 1 ]; if ( $node =~ /^(?:MS|TS|BP|Dummy)_([[:alnum:]]+)_[[:alnum:]]+ +_(?:0001(?:_[[:xdigit:]]{4})?|[[:xdigit:]]{4})$/ ) { print "$1\n"; } } }
In reply to Re: String with multiple underscores
by jwkrahn
in thread String with multiple underscores
by sgowrish
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |