in reply to Re: Regex (find an * after a digit)
in thread Regex (find an * after a digit)
As for the \d{1,} -- I was actually going to put an upper limit on it at one point, so just wrote it that way. For now the + will do though.#!/usr/bin/perl # # use strict; use warnings; my $file = "input.txt"; open ( FILE, $file ) || die "Can't open $file $!"; while ( <FILE> ) { chomp; if ( $_ = /\d+\*/ ) { print "$_\n"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Regex (find an * after a digit)
by I0 (Priest) on Feb 06, 2004 at 03:39 UTC | |
|
Re: Re: Re: Regex (find an * after a digit)
by ysth (Canon) on Feb 06, 2004 at 09:52 UTC |