Date: Mon, 2 Oct 2000 14:01:11 -0400 (EDT) From: Christopher Rued <c.rued@xsb.com> To: freebsd-questions@freebsd.org Subject: Perl question Message-ID: <14808.52583.347797.384055@chris.xsb.com>
next in thread | raw e-mail | index | archive | help
I realize that this is not really a FreeBSD question, but I like this mailing list and the answers that are sent to it :). My question is: How do I have perl return me the first and only the first match to a regular expression? I know that I can return /all/ matches to an array, and get the first one, but I only want to have it evaluate as far as the first match and then stop. For example, given the string xayxbyxcy and the regular expression x.y, I want it to return to me only xay and not evaluate any further. Thanks in advance. -- -Chris Rued To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?14808.52583.347797.384055>