HTML::...::Regex(3pm)

πŸ“¦
version 2.07000 Β· 5 versions
, in debian bookworm, ubuntu jammy, ubuntu noble

πŸ’– HTML::FormFu::Constraint::Regex β€” the regex constraint, bestie πŸ’–

manual page for HTML::FormFu::Constraint::Regex (that's the 3pm one, perl module core πŸ’…)


✨ VERSION ✨

version 2.07 β€” yeah she's on 2.07, iconic


🌸 DESCRIPTION 🌸

It's a constraint. It's based on regular expressions. That's literally the whole vibe: regex-based constraint πŸ¦‹


πŸ‘‘ METHODS πŸ‘‘

πŸ’… regex

Arguments: $regex.

Okay so when you're doing this in a config file, you gotta wrap the regex up in a string, like exactly this:

regex: '^[-_+=!\w\d]*\z'

Arguments: $string

(also takes $string, yes ma'am 🫢)

πŸŽ€ common

Arguments: \@parts

This one is used to build a Regexp::Common regex. So you feed it parts, it constructs the whole thing for you. Very demure, very mindful ✨

And listen β€” the following definition is equivalent to:

$RE{URI}{HTTP}{-scheme => 'https?'}

which in config land looks like:

type: Regex
common:
  - URI
  - HTTP
  - { '-scheme': 'https?' }

no cap, that's the same thing, just typed out cute πŸ’–

🌈 anchored 🌈

Arguments: bool

If it's true, it uses "^" and "\z" to anchor the "regex" or "common" to the start and end of the submitted value. So like, the whole value has to match β€” no sneaky extra stuff slipping through the sides, periodt πŸ’…


πŸ¦‹ SEE ALSO πŸ¦‹

  • She is a sub-class of, and inherits methods from, HTML::FormFu::Constraint β€” so go read that too, bestie, the inheritance is giving family tree 🌳
  • HTML::FormFu β€” the whole parent situation, main character energy πŸ‘‘

πŸ’œ AUTHOR πŸ’œ

Carl Franks "cfranks@cpan.org"

Based on the original source code of HTML::Widget::Constraint::Regex, by Sebastian Riedel, "sri@oook.de". Shoutout to the OGs πŸ™Œ


πŸ“ LICENSE πŸ“

This library is free software, you can redistribute it and/or modify it under the same terms as Perl itself. So like, go off, remix it, it's yours 🫢


⭐ AUTHOR (yes, again, she's thorough) ⭐

Carl Franks <cpan@fireartist.com>


This software is copyright (c) 2018 by Carl Franks.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Same energy, same terms, we love a consistent license πŸ’–


and that's the whole page, bestie πŸŽ€ this was documented with perl v5.28.1 back on 2019-01-12 β€” ancient artifact, still slaying, iykyk βœ¨πŸ’…
πŸ“¦ where this page comes from