Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using a regular expression with either ^ OR $ breaks the regular expression match logic. #53

Closed
navaneethyv opened this issue Sep 17, 2020 · 0 comments
Labels

Comments

@navaneethyv
Copy link

navaneethyv commented Sep 17, 2020

Consider the following pattern.

 typedef system-id {
   type string {
     pattern
       '^[0-9A-Fa-f]{4}\.[0-9A-Fa-f]{4}\.[0-9A-Fa-f]{4}';
   }
 }

It has only ^ at the beginning.

clixon> set system-id 1111.1111.1111
CLI syntax error: "set system-id 1111.1111.1111": regexp match fail: 1111.1111.1111 does not match ^[0-9A-Fa-f]{4}.[0-9A-Fa-f]{4}.[0-9A-Fa-f]{4}

Even though it is a valid regular expression match. Was working in 4.3 version.

Workaround is either both ^ $ should be given or without both of them.

olofhagsand added a commit that referenced this issue Nov 30, 2020
* [Using a regular expression with either ^ OR $ breaks the regular expression match logic](#53)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants