in reply to Allowing regex entries in web form to search database: Risks or gotchas?

We use Text::Glob as user API

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

  • Comment on Re: Allowing regex entries in web form to search database: Risks or gotchas?

Replies are listed 'Best First'.
Re^2: Allowing regex entries in web form to search database: Risks or gotchas?
by Polyglot (Chaplain) on Aug 09, 2022 at 01:41 UTC

    A few things jumped out at me in looking at the CPAN page you linked.

    1. The regex rules provided are not the same as those of Perl (e.g. swapping ?/. and |/,);
    2. The full ruleset is either not attested or is extremely limited/restricted;
    3. The module seems a little old (maybe predates some of the newer regex features);
    4. The word "separator" was consistently misspelled.

    Seeing as the syntactical changes are unnecessary, I would prefer to stick with a pure PCRE. Why use commas in place of pipes and question marks in place of periods when the functionality for these remains exactly the same? And what happened to the zero-or-one match capability provided by the question mark? What replaces that?

    Back to doing it my own way...TMTOWTDI doesn't mean I will like every other way of doing it.

    Blessings,

    ~Polyglot~

      > The word "separator" was consistently misspelled.

      Schocking! 🧐

      Cheers Rolf
      (addicted to the Perl Programming Language :)
      Wikisyntax for the Monastery