in reply to pattern matching
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;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: pattern matching
by Anomynous Monk (Scribe) on May 04, 2004 at 18:18 UTC |