UPDATE:#!/usr/bin/perl -w use strict; my $line = "0010 0010 text // text // JOHN DOE"; chomp $line; if ($line =~ /^(0010 ){2}(.*\/\/ ){2}(.*)$/) { my $name = $3; }
my $name = "0010 0010 text // text // JOHN DOE"; chomp($name); + $name =~ s/^(0010 ){2}(.*\/\/ ){2}(.*)$/$3/i; print $name;
In reply to Re: pattern matching
by perlinux
in thread pattern matching
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |