Skip to content

Cannot match end-of-pattern match #84

Open
@perazz

Description

@perazz

Hi and thanks for an amazing library - I'm developing a Fortran port of it here.

I've just found an issue/potential bug with the end-pattern command.

text = "table football"
pattern = "l$"

returns index=13, matchlength=3

Here's the sample test program:

#include <stdio.h>
#include <stdlib.h>
#include "re.h"
int main() {

   const char *text = "table football";
   const char *pattern = "l$";
   int index,len;

   index = re_match(pattern, text, &len);

   printf("index=%d len=%d \n",index,len);
}

Tested on Mac with clang 13.1.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions