[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]



I'm trying to strip the file name from the following string:

/opt/SAM/SystemConfig/vtun.pl

I'm using the following regext:

m/\/(.+)/;

That seems to only work if there is only one '/' in the name.
Since the file can be called with any pathname I need to strip
all the way to the last '/'  Is there a way to do this with
regex or should I use strip and get the last element of
the array?

Thanks,
Chris


</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<ul><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><a name="00330" href="msg00330.html">[ale] Perl Regexe questions</a></strong>
<ul><li><em>From:</em> keith.watson at gtri.gatech.edu (Keith R. Watson)</li></ul></li>
<li><strong><a name="00349" href="msg00349.html">[ale] Perl Regexe questions</a></strong>
<ul><li><em>From:</em> jasonday at worldnet.att.net (Jason Day)</li></ul></li>
</ul></li></ul>
<!--X-Follow-Ups-End-->
<!--X-References-->
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00323.html">[ale] glibc compatibility problem</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00325.html">[ale] Apache on RH AS3 in RPM heck</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00327.html">[ale] argv[0] in perl</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00330.html">[ale] Perl Regexe questions</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00324"><strong>Date</strong></a></li>
<li><a href="threads.html#00324"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>