<div dir="ltr">Hi Francis,<div><br></div><div>Thanks for clearing up my understanding... More inline.<br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 20, 2017 at 6:16 PM, Francis Dupont <span dir="ltr"><<a href="mailto:fdupont@isc.org" target="_blank">fdupont@isc.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">Jason Guy writes:<br>
> I have a question on substring matching with the vendor class identifier,<br>
</span>> which seems easy enough, but the strings *can* have a variable length. This<br>
<span class="">> is also a problem for isc-dhcp apparently, in that you must indicate the<br>
> range of the substring match.<br>
<br>
</span>=> BTW Kea substring is a super set of ISC DHCP one, for instance<br>
it can run from the end of string.<br>
<span class=""><br>
> I don't see in the docs any way to do a regex (which would be excellent).<br>
<br>
</span>=> after a nasty bug in bind9 with a regex library which matches some<br>
particular samples in nearly unbound time I am not so sure. BTW<br>
you can still write a hook: classification is for usual / easy cases.<br></blockquote><div><br></div><div>I can imagine, regex can get complicated. I have been tempted to write some hooks, </div><div>but I have not touched C in a long time. I am sure I can do it, but wanted to understand </div><div>and use all of the available "built-in" functionality first. :) </div><div>Is there a sample "hello world" hook to start from? ;)</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
> However in the current function *substring( option, start, end )*, why<br>
> specify the end index?<br>
=> it is not an end index but the length (which can be negative as<br>
the start or be "all"). Is there a documentation saying "end"?<br></blockquote><div><br></div><div>Oh, I was looking at it from one perspective where the start == 0, then the end == length. </div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
> Thoughts?<br>
<br>
=> I am afraid you did read the right documentation...<br>
<br>
Thanks<br>
<br>
Francis Dupont <<a href="mailto:fdupont@isc.org">fdupont@isc.org</a>><br>
</blockquote></div><br></div></div></div>