Re: RegEx Hell

2006-01-31 Thread JupiterHost.Net
so cool. I'm using Brian Ingerson's IO:ALL to slurp some files May want to look at File::Slurp also, its highly efficient, may help :)

Re: RegEx Hell

2006-01-31 Thread Mark Galbreath
Beer?  I'm all over that!  I gotta get out of here early (before 8:00 PM) today because Bush is giving the State of the Union at the Capital...about 4 blocks away.   Mark>>> Steven Lembark <[EMAIL PROTECTED]> 31-Jan-06 12:34:18 PM >>> > this kind of question would best go to your local perl monge

Re: RegEx Hell

2006-01-31 Thread Mark Galbreath
Thanks to all (even the flames  : -)    ) who suggested:     perldoc File::Basename;    perldoc File::Spec;I just got a new job programming Perl 5.8.7.  My last Perl experience was 10 years ago with 5.0, and my regex is rusty.  Not that I ever liked regex to begin with, which is why File::Spec and

Re: RegEx Hell

2006-01-31 Thread Steven Lembark
> this kind of question would best go to your local perl mongers chapter Er... no. Unless the issue is splitting up a path to the nearest beer, I'd suggest keeping it out of ny.pm.org :-) -- Steven Lembark 85-09 90th Street Workhorse Computing

Re: RegEx Hell

2006-01-31 Thread Steven Lembark
> Better yet, somebody please profer a solution? :-) perldoc File::Basename; perldoc File::Spec; -- Steven Lembark 85-09 90th Street Workhorse ComputingWoodhaven, NY 11421 [EMAIL PROTECTED]

Re: RegEx Hell

2006-01-31 Thread Tyler MacDonald
Mark Galbreath <[EMAIL PROTECTED]> wrote: > Close enough to perl, I hope... > > I'm trying to string the filename from the path: > >/dir/subdir/file.ext => file.ext > > with > > /\w+\.\w+$/ > > and am getting the entire path returned. I am falling asleep reading the > perldoc regex

Re: [OT]Re: RegEx Hell

2006-01-31 Thread John ORourke
or $bla=~/([^\/]+)$/; in case the filenames have non-alpha chars or more dots... Tom Schindl wrote: on the other hand: my $bla = "/dir/subdir/file.ext"; $bla =~ /(\w+\.\w+)$/; print $1 . "\n"; # file.ext works perfectly

Re: RegEx Hell

2006-01-31 Thread David Nicol
On 1/31/06, Mark Galbreath <[EMAIL PROTECTED]> wrote: > > Close enough to perl, I hope... this kind of question would best go to your local perl mongers chapter but anyway, I'll break the rules for someone from the General Accounting Office on the occasion of the retirement of Mr. Greenspan... >

Re: RegEx Hell

2006-01-31 Thread Geoffrey Young
Mark Galbreath wrote: > Close enough to perl, I hope... not really, but we'll forgive you. > > I'm trying to string the filename from the path: > >/dir/subdir/file.ext => file.ext see File::Spec::splitpath() :) --Geoff

Re: RegEx Hell

2006-01-31 Thread Mark Galbreath
Too Cool!!  Thanks, Tom!   mark>>> Tom Schindl <[EMAIL PROTECTED]> 31-Jan-06 12:06:22 PM >>> man File::Spec ;-)Mark Galbreath wrote:> Close enough to perl, I hope...>  > I'm trying to string the filename from the path:>  >    /dir/subdir/file.ext => file.ext>  > with>  >   /\w+\.\w+$/>  > and am

[OT]Re: RegEx Hell

2006-01-31 Thread Tom Schindl
on the other hand: -8<- my $bla = "/dir/subdir/file.ext"; $bla =~ /(\w+\.\w+)$/; print $1 . "\n"; # file.ext -8<- works perfectly Mark Galbreath wrote: > Close enough to perl, I hope... > > I'm trying to string the filename from

Re: RegEx Hell

2006-01-31 Thread Tom Schindl
man File::Spec ;-) Mark Galbreath wrote: > Close enough to perl, I hope... > > I'm trying to string the filename from the path: > >/dir/subdir/file.ext => file.ext > > with > > /\w+\.\w+$/ > > and am getting the entire path returned. I am falling asleep reading > the perldoc regex

RegEx Hell

2006-01-31 Thread Mark Galbreath
Close enough to perl, I hope...   I'm trying to string the filename from the path:      /dir/subdir/file.ext => file.ext   with     /\w+\.\w+$/   and am getting the entire path returned.  I am falling asleep reading the perldoc regex "intro," "tutorial," full doc, and even Jeffrey Friedl's "Maste