Repository navigation
Releases
Releases · sebscholl-labs/regexes
v0.1.1
Changed
leading,trailingandwholeleave out a boundary of one set at the end they anchor to the text:
Regexes.uuid.wholeis\A[0-9a-fA-F]{8}-…\z, no longer\A(?<![0-9a-fA-F])…(?![0-9a-fA-F])\z.
Nothing lies past an anchored end for the boundary to refuse, so every pattern matches what it did;
ecma_sourceis shorter, and a JSON Schema built from it reads as one written by hand.
Full Changelog: v0.1.0...v0.1.1
v0.1.0
0.1.0 - 2026-11-21
Added
- The library, extracted from an application where it was written:
Regexes::Expression(a frozen
Regexpwith anchors, repetition and case-insensitivity),Regexes::CharacterClass(a set of
characters that can be excluded and extended),Regexes.sequenceandRegexes.either, and the named
patterns: sets of characters, line breaks, integers, UUIDs, identifiers, UTC offsets, ISO 8601 times,
HTTP schemes, DNS labels, domain names, email addresses and Markdown code spans. Regexes.iso8601_dateandRegexes.iso8601_time(the time of day), of whichiso8601_date_timeis built.- Line anchors:
Expression#line_leading,#line_trailingand#whole_line, which know\r\n,\rand
\nas line breaks, and#line_leading?/#line_trailing?. Expression#captured(name), a named capture around an expression.- Lookarounds:
Expression#followed_by,#not_followed_by,#preceded_byand#not_preceded_by. Regexes.literal(text), text matched character for character.Regexes.register(name, pattern)adds an application's own pattern under a name, as a frozen expression with
every variation;Regexes.registeredlists the names added.- Sets:
uppercase_letters,uppercase_alphanumeric,binary_digits,octal_digits,base32_digits,
base58_digits,base64_digits,base64url_digits,ascii_whitespace,dashes,apostrophes,
double_quotes,unicode_letters,unicode_digits,combining_marks,control_charactersand
format_characters. - Breaks:
unicode_line_breakandparagraph_break. - Numbers:
unsigned_integer,positive_integer,decimal(places:),unsigned_decimal(places:),json_number,
latitude,longitudeandport_number. - Identifiers:
snake_case,screaming_snake_case,kebab_case,camel_case,pascal_case,ulid,
semantic_version,media_type,json_web_token,base64andbase64url. - Times:
iso8601_year_month,iso8601_durationandrfc3339_timestamp. - Network:
uri_scheme,http_url,ipv4_address,ipv6_address,ip_address,ipv4_cidr,ipv6_cidrand
mac_address. - Mail:
message_idandheader_field_name. - Codes:
e164_phone_number,iban,bic,language_tagandhex_color. - Text:
markdown_code_block(a fenced block, capturing itslanguageandcode),markdown_link,
ruby_format_reference,mustache_tag,shell_variable_reference,file_extensionandemoji. Regexes.markdown_code_spantakes a fence of any number of backticks (so``a ` b``holds a backtick),
closing at the first run of the same length, and runs over a line break but never a blank line.Expression#ecma_sourceand#ecma_flagstranslate an expression into ECMAScript, for JavaScript and JSON
Schema; what ECMAScript can't match the same way raisesRegexes::UntranslatableError.
Changed
-
Breaking:
Regexes.iso8601_timeis renamediso8601_date_time;iso8601_timeis now the time of day
alone.Regexes.backtick_codeis renamedmarkdown_code_span. -
Breaking:
Regexes.email_addressmatches what an HTMLtype=emailinput accepts (WHATWG) instead of
any text around one@: quoted local parts, IP-literal domains and characters outside the WHATWG set are
refused. -
Breaking: ISO 8601 fields are checked against their ranges (month, day, hour, minute, second, offset),
so2026-13-01and24:00are refused. -
Regexes.uuid, and the ISO 8601 patterns that start or end with a digit, never match inside a longer run of
hex digits or digits.
Fixed
Regexes.dns_labelrefuses a label of more than 63 characters, andRegexes.domain_namea name of more
than 253 (RFC 1035).