# Module: Puppet::Pops::Patterns Private

Defined in:
lib/puppet/pops/patterns.rb

## Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

The Patterns module contains common regular expression patters for the Puppet DSL language

## Constant Summary collapse

NUMERIC =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

NUMERIC matches hex, octal, decimal, and floating point and captures several parts 0 = entire matched number, leading and trailing whitespace and sign included 1 = sign, +, - or nothing 2 = entire numeric part 3 = hexadecimal number 4 = non hex integer portion, possibly with leading 0 (octal) 5 = floating point part, starts with “.”, decimals and optional exponent

Thus, a hex number has group 3 value, an octal value has group 4 (if it starts with 0), and no group 3 and a floating point value has group 4 and group 5.

`%r{\A[[:blank:]]*([-+]?)[[:blank:]]*((0[xX][0-9A-Fa-f]+)|(0?\d+)((?:\.\d+)?(?:[eE]-?\d+)?))[[:blank:]]*\z}`
WS_BETWEEN_SIGN_AND_NUMBER =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Special expression that tests if there is whitespace between sign and number. The expression is used to strip such whitespace when normal Float or Integer conversion fails.

`%r{\A([+-])[[:blank:]]+(.*)\z}`
ILLEGAL_HOSTNAME_CHARS =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

ILLEGAL_P3_1_HOSTNAME matches if a hostname contains illegal characters. This check does not prevent pathological names like ‘a.…b’, ‘.….’, “—”. etc.

`%r{[^-\w.]}`
NAME =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

NAME matches a name the same way as the lexer.

`%r{\A((::)?[a-z]\w*)(::[a-z]\w*)*\z}`
CLASSREF_EXT =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

CLASSREF_EXT matches a class reference the same way as the lexer - i.e. the external source form where each part must start with a capital letter A-Z.

`%r{\A((::){0,1}[A-Z][\w]*)+\z}`
CLASSREF_EXT_DECL =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

`%r{\A[A-Z][\w]*(?:::[A-Z][\w]*)*\z}`
CLASSREF =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

CLASSREF matches a class reference the way it is represented internally in the model (i.e. in lower case).

`%r{\A((::){0,1}[a-z][\w]*)+\z}`
CLASSREF_DECL =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

`%r{\A[a-z][\w]*(?:::[a-z][\w]*)*\z}`
DOLLAR_VAR =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

DOLLAR_VAR matches a variable name including the initial \$ character

`%r{\\$(::)?(\w+::)*\w+}`
VAR_NAME =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

VAR_NAME matches the name part of a variable (The \$ character is not included) Note, that only the final segment may start with an underscore. Note, regexp sensitive to backtracking

`%r{\A(?:::)?(?:[a-z]\w*::)*[a-z_]\w*\z}`
PARAM_NAME =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

PARAM_NAME matches the name part of a parameter (The \$ character is not included)

`%r{\A[a-z_]\w*\z}`
NUMERIC_VAR_NAME =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

A Numeric var name must be the decimal number 0, or a decimal number not starting with 0

`%r{\A(?:0|(?:[1-9][0-9]*))\z}`
{"ft_lang_label":"__label__en","ft_lang_prob":0.823909,"math_prob":0.9644637,"size":4333,"snap":"2023-40-2023-50","text_gpt3_token_len":1146,"char_repetition_ratio":0.16447216,"word_repetition_ratio":0.45544556,"special_character_ratio":0.2822525,"punctuation_ratio":0.15777777,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9754661,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-12-11T00:24:22Z\",\"WARC-Record-ID\":\"<urn:uuid:d5ba0e37-e961-4331-8dfb-c18c3b6f291b>\",\"Content-Length\":\"13375\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:fc38440a-d885-4a80-9946-651be3fd2c8a>\",\"WARC-Concurrent-To\":\"<urn:uuid:5583ab87-e638-48f7-b0ec-ef2bd1790b22>\",\"WARC-IP-Address\":\"104.21.10.149\",\"WARC-Target-URI\":\"https://www.rubydoc.info/gems/puppet/Puppet/Pops/Patterns\",\"WARC-Payload-Digest\":\"sha1:ZNMF7LOO6ELLNJGI24TBTH75CRZES4C7\",\"WARC-Block-Digest\":\"sha1:RUQOBSUPR6APREPYF4VHZY3COQ5LTM62\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-50/CC-MAIN-2023-50_segments_1700679102697.89_warc_CC-MAIN-20231210221943-20231211011943-00079.warc.gz\"}"}