8000 RE_ANCHORED incorrect for re_is_literal() · Issue #514 · katef/libfsm · GitHub
[go: up one dir, main page]

Skip to content

RE_ANCHORED incorrect for re_is_literal() #514

Open

Description

@katef

the -b here should cause implicit anchoring. instead it cases re_is_literal() to categorise the regex as not a literal:

; ./build/bin/re -br pcre -t 'a[b]c{1}'
; echo $?
1
; 
; ./build/bin/re -br pcre -t '^a[b]c{1}\z'
; echo $?                                 
1
; 

correctly:

; ./build/bin/re -r pcre -t '^a[b]c{1}\z' 
anchors: ^$
literal: abc
; echo $?                                
0
; 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0