splitOnce has asked for the wisdom of the Perl Monks concerning the following question:
to see weather my line end with a word mix with character and digits ,, a line would look like this :if ( ($newLine =~ /$/)[0] eq /(\w+)$/ ) { print " the line $newLine\n"; }
that line is a one I would like to print b/c it countins a word at the end "dwo9" , however if it was somthing like @@ or a digit by it self or ? mark then I wont print. The pice of code I am doing seems to catch everything which is not what i want . peaceyty~uyuoo~iu99~##uyt~hu/dwo9
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: regex end of line
by japhy (Canon) on Jul 30, 2002 at 19:40 UTC | |
|
Re: regex end of line
by Cine (Friar) on Jul 30, 2002 at 19:36 UTC | |
by splitOnce (Acolyte) on Jul 30, 2002 at 19:51 UTC | |
|
Re: regex end of line
by DamnDirtyApe (Curate) on Jul 30, 2002 at 19:33 UTC |