katef / libfsm

DFA regular expression library & friends

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Behavior of `-G length` inconsistent, moreover returns error code.

pierreganty opened this issue · comments

Hi,

When asking re for an example of length up to 20 then none is returned.
If, for the same regular expression, I ask re to return an example of length 21 then it returns two examples, the first of which has length 20.

Moreover, in both calls re returns 1 which is an error code according to the man page. I am not sure why, though.

: ~/.local/libfsm/bin ; ./re  -b -G20 '([A-Z0-9]+);([^;]+);([^;]+);([0-9]+);([^;]+);([^;]*);([0-9]*);([0-9]*);([-0-9/]*);([YN]);([^;]*);([^;]*);([^;]*);([^;]*);([^;]*)'; echo $?
1
: ~/.local/libfsm/bin ; ./re  -b -G21 '([A-Z0-9]+);([^;]+);([^;]+);([0-9]+);([^;]+);([^;]*);([0-9]*);([0-9]*);([-0-9/]*);([YN]);([^;]*);([^;]*);([^;]*);([^;]*);([^;]*)'; echo $?
0;!;!;0;!;;;;;N;;;;;
0;!;!;0;!;;;;;N;;;;;!
1