Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^3: Need help on regexp

by 2teez (Priest)
on Aug 04, 2013 at 06:40 UTC ( #1047771=note: print w/ replies, xml ) Need Help??


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

abcd_efgh-1.2.3 abcd_efgh-1.2.3-hjik-3.4.5.tar.gz
then simply doing this:
while (<DATA>){ print $_ if /3$/; }
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".
All that been said on the assumption that, that was what was intended by the OP.

If you tell me, I'll forget.
If you show me, I'll remember.
if you involve me, I'll understand.
--- Author unknown to me


Comment on Re^3: Need help on regexp
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1047771]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (6)
As of 2014-12-20 04:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (95 votes), past polls