:relfileprefix: ../../../ [#boost-urls-grammar-dec_octet_rule] == xref:boost.adoc[pass:[boost]]::xref:boost/urls.adoc[pass:[urls]]::xref:boost/urls/grammar.adoc[pass:[grammar]]::dec_octet_rule Match a decimal octet === Synopsis Declared in header `` [source,cpp,subs="verbatim,macros,-callouts"] ---- constexpr pass:q[_implementation-defined_] dec_octet_rule = {}; ---- === Description A decimal octet is precise way of saying a number from 0 to 255. These are commonly used in IPv4 addresses. [,cpp] ---- using value_type = unsigned char; ---- === Rules are used with the function xref:boost/urls/grammar/parse-02.adoc[parse] . [,cpp] ---- system::result< unsigned char > rv = parse( "255", dec_octet_rule ); ---- [,cpp] ---- dec-octet = DIGIT ; 0-9 / %x31-39 DIGIT ; 10-99 / "1" 2DIGIT ; 100-199 / "2" %x30-34 DIGIT ; 200-249 / "25" %x30-35 ; 250-255 ---- * link:https://datatracker.ietf.org/doc/html/rfc3986#section-3.2.2[3.2.2. Host (rfc3986)] === See Also xref:boost/urls/grammar/parse-02.adoc[parse] .