[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gawk] awk V4 patsplit: many unexpected 0 length elements in out
From: |
Davide Brini |
Subject: |
Re: [bug-gawk] awk V4 patsplit: many unexpected 0 length elements in output array |
Date: |
Mon, 17 Feb 2014 15:54:31 +0100 |
On Mon, 17 Feb 2014 08:06:54 -0500, David Kra <address@hidden> wrote:
> Alert: I am not a regexpert. It could be that my regex *does* match the
> null string, though I can't see how. It is a long assembly of several
> shorter regex's, each wrapped in () and then all ||'d together, as in:
> "(p1)||(p2)||(p3)||(p4)||(p5)"
>
> "([ABDE][0-9][0-9A-Z]{4}[A-Z])||([ABDE][0-9A-Z]{1}[0-9][0-9A-Z]{3}[A-Z])||([ABDE][0-9A-Z]{2}[0-9][0-9A-Z]{2}[A-Z])||([ABDE][0-9A-Z]{3}[0-9][0-9A-Z]{1}[A-Z])||([ABDE][0-9A-Z]{4}[0-9][A-Z])"
>
>
> The goal is to match 7 character strings that start with one of a few
> letters, ends in a letter, has alphanumerics in the middle, but must have
> at least one digit in the middle.
I haven't looked much into it, but the regexp alternation operator is
definitely "|" (a single pipe), not "||".
--
D.