BULK actually does _not_ use regex for its syntax.

It does, however, "borrow" from regex in the way it identifies
backreferences.  The similarities are intentional as to "feel"
familiar and be simple to grasp.  This familiarity is likely
the cause of this misconception.  Another is likely the use
of regex in sections of example pcode.


--
Q.  Why not just use regex?

A.  Regex can be intimidating for some and it is downright
    painful for the narrow scope of the BULK RR draft.
    BULK RR patterns can only* contain literal character-strings
    and numeric ranges (including hex).


Let's take a simple everyday example of matching the numeric range
from 0 to 255.  Matching this simple (and common) numeric range
quickly becomes a bit confusing and complicated to just visualize.


REGEX:

(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)


BULK Pattern:

[0-255]

In the BULK example, a simple glance and the intent is obvious.


Just think what the range of 5 to 240 might look like as regex
syntax (scary).



NOTE: The regex pattern was borrowed from a quick web search
      (link below).  I'm sure there are others but none with
      the same clarity as a simple range.

      https://chrisjwarwick.wordpress.com/2012/09/16/
      more-regular-expressions-regex-for-ip-v4-addresses/

*  A single-hyphen may be used to further simplify this under
    certain circumstances.


-- THESE ARE THE DROIDS TO WHOM I REFER:
This communication is the property of CenturyLink and may contain confidential 
or privileged information. Unauthorized use of this communication is strictly 
prohibited and may be unlawful. If you have received this communication in 
error, please immediately notify the sender by reply e-mail and destroy all 
copies of the communication and any attachments.
_______________________________________________
DNSOP mailing list
DNSOP@ietf.org
https://www.ietf.org/mailman/listinfo/dnsop

Reply via email to