
winfinit
User
Oct 9, 2007, 7:19 PM
Post #3 of 3
(1379 views)
|
|
Re: [kogantiuday] regular expression help
[In reply to]
|
Can't Post
|
|
first word could be something like this $entry=~/^[*?] /; for further info read through regex tutorials In action: ============ winfinits-computer:~ winfinit$ cat test this is the sentence. and this is anothher one also this is another line and this is my last line winfinits-computer:~ winfinit$ cat test.pl #!/usr/bin/perl @test=`cat test`; foreach (@test) {$_=~/^(.*?) /; print "$1\n";} winfinits-computer:~ winfinit$ perl test.pl this also and ======================
|