Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: super search by regex (updated)

by LanX (Saint)
on Jul 07, 2024 at 14:47 UTC ( [id://11160421]=note: print w/replies, xml ) Need Help??


in reply to super search by regex

One of the problems with a regex interface is security.

You have to make sure it's not injecting code and that it's terminating in reasonable time.

Not sure why you need that tho

I used globs for that reason in one of my projects, (they translated to regex but safely) and it was sufficient for 99% of our users.

> not entirely clear to me what the separate strings with option does

I think you are talking about the option to separate different sub strings with something different than space, like that you can search for substrings where a space is included.

Like

  • missing|your mother
would search
  • "missing","your mother"
with "|" as separator, but
  • "missing|your","mother"
by default

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

Update

Your way of linking is constantly logging me out, not everybody is using www.perlmonks.org.

Please prefer ids like [id://11160421] or node name links [node name]

See also site how to

Replies are listed 'Best First'.
Re^3: super search by regex (updated)
by jdporter (Paladin) on Jul 07, 2024 at 16:30 UTC
      > site how to is not recommended for current advice

      It's listed below the textarea when replying

      Want more info? How to link or How to display code and escape characters are good places to start.

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

        Thanks! I will fix that.

Re^2: super search by regex (updated)
by Anonymous Monk on Jul 07, 2024 at 18:29 UTC
    Perl has special forces :
    Perl maintains a cache of visited states in order to short circuit redundant paths through the NFA, permitting it to evaluate some searches in linear time that take polynomial or exponential time in other Spencer engines.
    from "Can Regular Expressions Be Safely Reused Across Languages?": i-programmer.info/programming/perl/13051-can-regular-expressions-be-safely-reused-across-language-boundaries.html
Re^2: super search by regex (updated)
by Danny (Hermit) on Jul 07, 2024 at 16:08 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11160421]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2024-09-09 09:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.