Hal Vaughan wrote:
> Gunnar Hjalmarsson wrote:
>> I don't understand why everyone (except me) suggest solutions
>> with extended regex patterns. It may be the most accurate answer
>> to OP's literal question, but don't you forget the context? You
>> don't need any extended pattern to exclude filenames matching a
>> pattern when archiving files, do you? And isn't !/string/ an
>> easier solution that would be preferable in this case?
>
> Actually, your solution is much simpler (as to which is faster, I
> would not know). But, as an additional point, I am self taught,
> and learning about look-behinds will be helpful, not just for this
> context, but in other contexts.
>
> In this particular case, using !/string/ was simpler and what I
> used in for this particular problem. However, there are some other
> problems I'm working on with regexes, and for those, the
> look-behind will be a HUGE help for me.
Okay, Hal, it's good that you (and others) will benefit from their
mentioning of extended patterns. It's just that people who answer here
typically take great pains in finding the most suitable method for
addressing OP's question, and I began to wonder if I had missed
something. But since nobody has claimed that extended patterns are
necessary, I suppose not.
> The holes in one's experience if you're self-taught can be very
> frustrating, at times.
Yeah, indeed they can.
--
Gunnar Hjalmarsson
Email:
http://www.gunnar.cc/cgi-bin/contact.pl