corenova / yang-js

YANG parser and composer
Apache License 2.0
56 stars 18 forks source link

wrong regexp generated in string pattern (typedef) #67

Closed AdCsoft closed 6 years ago

AdCsoft commented 6 years ago

The regexp generated for any pattern is not "pattern" but must be: "^pattern$" otherwise any expression incuding a valid expression will match, for example if the pattern in a typedef is "[A].*[B]" QQQQQABQQQQ would match. :-) ciao Andrea

sekur commented 6 years ago

Thanks, you’re right. I’ll update code to force a complete string match.