in reply to Re^2: Need help on regexp
in thread Need help on regexp
Hi kcott,
OK, that got a bit of a chuckle as /3$/ was really intended as a non-solution to highlight the lack of information provided in the question...
Sorry, I misunderstood your write up. But I kind of see a solution in it, that was why I mentioned it.
Thinking if what the OP has is a file that contain say
then simply doing this:abcd_efgh-1.2.3 abcd_efgh-1.2.3-hjik-3.4.5.tar.gz
prints abcd_efgh-1.2.3, and thanks to if /3$/; of course using ONLY these OP strings. It could be a different thing if there are other strings ending with "3".while (<DATA>){ print $_ if /3$/; }
|
|---|